OfflineSwitch

open class OfflineSwitch

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

Functions

Link copied to clipboard
@NonNull
@MainThread
open fun getInstance(): OfflineSwitch
Returns the OfflineSwitch singleton instance.
Link copied to clipboard
@MainThread
open fun isMapboxStackConnected(): Boolean
Provides information if the Mapbox stack is connected or disconnected via OfflineSwitch.
Link copied to clipboard
@RestrictTo(value = Scope.LIBRARY_GROUP_PREFIX)
@MainThread
open fun registerObserver(@NonNull observer: OfflineSwitchObserver)
WARNING: This API is not intended for public usage.
Link copied to clipboard
@MainThread
open fun reset()
Releases the OfflineSwitch singleton instance.
Link copied to clipboard
@MainThread
open fun setMapboxStackConnected(connected: Boolean)
Connects or disconnects the Mapbox stack.
Link copied to clipboard
@RestrictTo(value = Scope.LIBRARY_GROUP_PREFIX)
@MainThread
open fun unregisterObserver(@NonNull observer: OfflineSwitchObserver)
WARNING: This API is not intended for public usage.