OfflineSwitch

open class OfflineSwitch

Instance that allows connecting or disconnecting the Mapbox stack to the network.

Functions

getInstance
Link copied to clipboard
open fun getInstance(): OfflineSwitch
Returns the OfflineSwitch singleton instance.
isMapboxStackConnected
Link copied to clipboard
open fun isMapboxStackConnected(): Boolean
Provides information if the Mapbox stack is connected or disconnected via OfflineSwitch.
registerObserver
Link copied to clipboard
open fun registerObserver(@NonNull observer: OfflineSwitchObserver)
reset
Link copied to clipboard
open fun reset()
Releases the OfflineSwitch singleton instance.
setMapboxStackConnected
Link copied to clipboard
open fun setMapboxStackConnected(connected: Boolean)
Connects or disconnects the Mapbox stack.
unregisterObserver
Link copied to clipboard
open fun unregisterObserver(@NonNull observer: OfflineSwitchObserver)