MapboxInitializer

class MapboxInitializer : Initializer<Boolean>

Unified Mapbox SDKs initializer class that catches exceptions to avoid crashing during app process start.

Most of the crashes reported are related to UnsatisfiedLinkError (https://github.com/mapbox/mapbox-maps-android/issues/1109).

This solution is valid only when using Mapbox SDK for Android and no other Mapbox SDK (e.g. Navigation, Search,...).

In order to use this solution no other Mapbox SDK initializer should run (i.e. MapboxMapsInitializer or com.mapbox.common.MapboxSDKCommonInitializer) during process start. See the sdk/src/main/AndroidManifest.xml file.

Constructors

MapboxInitializer
Link copied to clipboard
fun MapboxInitializer()

Types

Companion
Link copied to clipboard
object Companion

Companion object for MapboxInitializer that holds some static state to keep track of initialization state and also provides init that does the SDK native stack initialization.

Functions

create
Link copied to clipboard
open override fun create(context: Context): Boolean

This code is run exactly one time on process startup.

dependencies
Link copied to clipboard
open override fun dependencies(): MutableList<Class<out Initializer<*>>>

We do not need any dependencies here.