Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intercom user registration without internet

I am invoking registerUserWithUserId and registerIdentifiedUser on ios and android, respectively to register a user.

If I try to register a user when the phone doesn't have internet (i.e. can't reach the intercom.io servers), will the library retry to register the user when internet is returned? Or should I retry to register the user when internet returns myself?

When observing network traffic with charles it looks like the library does try to reregister users when internet returns (which is awesome). But it's tough to know for sure since there's not explicit documentation for this usecase.

iOS:

[Intercom registerUserWithUserId:userId email:userEmail];

Android:

Intercom.client().registerIdentifiedUser(new Registration().withUserId(userId).withEmail(email));
like image 399
Steven Wexler Avatar asked Aug 11 '26 00:08

Steven Wexler


1 Answers

Yes, the library will contact Intercom when your internet connection resumes. There should be no need to think about network state when using Intercom.

The most important thing that registering a user does is persist the userId and email. This ensures that even if you have absolutely no connection, the user will be sent to Intercom at the next opportunity.

I hope this answers your question 😄 We should definitely document this better.

like image 186
JamesTreanor Avatar answered Aug 14 '26 12:08

JamesTreanor