Detect internet connectivity changes and switch between online/offline flows.
NetworkServicesStartNotifier
NetworkServicesGetStatus (optional initial poll)
NetworkServicesGetStatus
NetworkServicesOnInternetConnectivityChanged (persistent listener)
NetworkServicesOnInternetConnectivityChanged
isInternetActive (Bool)
isInternetActive
On app launch: call NetworkServicesStartNotifier.
Optional: call NetworkServicesGetStatus and branch using isInternetActive to initialize UI.
Keep NetworkServicesOnInternetConnectivityChanged in an active state:
eventConnected β resume online features / sync queued actions
eventConnected
eventDisconnected β pause online features / show offline UI
eventDisconnected
Listener actions should stay active; they fire events when connectivity changes.
Last updated 1 month ago