DGis
Entry point to the 2GIS SDK. At the start of work, you must call initialize.
Methods
@JvmStatic
fun initialize(
appContext: Context,
httpOptions: HttpOptions = HttpOptions(),
logOptions: LogOptions = LogOptions(LogLevel.WARNING),
vendorConfig: VendorConfig = VendorConfig(),
keySource: KeySource = KeySource(KeyFromAsset("dgissdk.key")),
dataCollectConsent: PersonalDataCollectionConsent = PersonalDataCollectionConsent.GRANTED,
platformHttpClient: HttpClient? = null,
platformAudioDriver: AudioDriver? = null,
mapOptions: GlobalMapOptions = GlobalMapOptions()
): Context
You must call this method before working with the SDK.
Parameters
appContext
Context
Android application context.
httpOptions
HttpOptions
Network client settings.
logOptions
LogOptions
Logging parameters.
vendorConfig
VendorConfig
Overrides the SDK configuration.
keySource
KeySource
Key source.
dataCollectConsent
PersonalDataCollectionConsent
Consent to data collection and data processing.
platformHttpClient
HttpClient?
Network client to be used instead of the standard one.
platformAudioDriver
AudioDriver?
Platform audio driver.
mapOptions
GlobalMapOptions
Settings applied to all maps.
Returns
Context
sdkContext required for SDK services to work.
@JvmStatic
fun context(): Context
Returns