3

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));
Steven Wexler
  • 16,589
  • 8
  • 53
  • 80

1 Answers1

2

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.

JamesTreanor
  • 152
  • 1
  • 9