GoogleMapsInitializer
object GoogleMapsInitializer
A singleton object to manage the initialization of the Google Maps SDK.
This object provides a state machine to track the initialization process and ensures that the initialization is performed only once. It also provides a mechanism to reset the initialization state, which can be useful in test environments.
The initialization process consists of two main steps:
Calling
MapsInitializer.initialize(context)
to initialize the Google Maps SDK.Calling
MapsApiSettings.addInternalUsageAttributionId(context, attributionId)
to add the library's attribution ID to the Maps API settings.
The state of the initialization is exposed via the state
property, which is a State object that can be observed for changes.