iterable-android-sdk
iterable-android-sdk copied to clipboard
Mob 4998 connectivity manager offline mode improvements
🔹 Jira Ticket(s) if any
✏️ Description
Improvements in ConnectivityManager for offline mode.
-
Default value to isConnected is set to true.
-
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.
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.
This can be merged once its verified working on older version of Android SDK