iterable-android-sdk icon indicating copy to clipboard operation
iterable-android-sdk copied to clipboard

Mob 4998 connectivity manager offline mode improvements

Open Ayyanchira opened this issue 1 year ago • 2 comments

🔹 Jira Ticket(s) if any

✏️ Description

Improvements in ConnectivityManager for offline mode.


  1. Default value to isConnected is set to true.

  2. Extra conditions for when to set isConnected false. Device can be connected to multiple network at once. Usually Wifi and cellular. Previous implementation would switch SDK mode to offline if either of the one got disconnected, thereby falsely picturing device being offline. This implementation takes multiple network into consideration and saves them in a Set. Only if all the network are disconnected, only then isConnected is flipped to false. onCapabilitiesChanged is another callback that can give even granular controls over if internet is actually present or not, but to keep it simple, this is a good improvement to existing functionality of offline mode.

Ayyanchira avatar Oct 20 '22 23:10 Ayyanchira