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 2 years 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

Codecov Report

Attention: Patch coverage is 43.47826% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 61.38%. Comparing base (58dcf29) to head (2d3c066).

Files Patch % Lines
...terableapi/IterableNetworkConnectivityManager.java 43.47% 11 Missing and 2 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #476      +/-   ##
==========================================
- Coverage   61.51%   61.38%   -0.14%     
==========================================
  Files          75       75              
  Lines        4695     4710      +15     
  Branches      533      535       +2     
==========================================
+ Hits         2888     2891       +3     
- Misses       1507     1515       +8     
- Partials      300      304       +4     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 21 '22 00:10 codecov[bot]

This can be merged once its verified working on older version of Android SDK

Ayyanchira avatar Mar 15 '24 22:03 Ayyanchira