initSdkWithDefaults

fun initSdkWithDefaults(context: Context, token: String? = null, timer: TimerService? = null, internalPath: String? = null, externalPath: String? = null, language: String? = null, languageTts: String? = null, savePolicy: GemSdk.EDataSavePolicy? = null, listener: ProgressListener? = null, appVariant: Int? = null, useApiExceptions: Boolean = false, logger: ApiCallLogger? = ApiCallLogger(), autoInitLiveDataSource: Boolean? = null, exceptionCallback: (Int, String) -> Unit? = null, allowOnline: Boolean = true, generateGPSLog: Boolean = false, groupingSeparator: Char? = null, decimalSeparator: Char? = null): Int

Initializes the sdk with DefaultNetworkManager If no token provided then will use GemSdk.getTokenFromManifest instead.

Return

error code (GemError.NoError on success, one of the remaining GemError codes on failure)

Parameters

context

Context.

token

SDK token.

Copy paste from GemSdk.initialize:

timer

This is used on platforms were the timer service cannot be implemented inside the Magic Earth Engine or when the API client can provide better timer service implementation. Default: Internal impl of TimerService.

listener

This is used to get notifications about the services manager creation progress. Default: null

appVariant

Application variant. Multiple applications can use the same application variant. Default: 0

internalPath

The path to the "Data" folder of the application located on internal/phone storage. Default: Util.getAppDirInternalPath with provided context as input.

externalPath

The path to the "Data" folder of the application located on external/SdCard storage. Default: Util.getAppFilesDirExternalPath with provided context as input.

savePolicy

Instructs the engine where to save the data. Default: EDataSavePolicy.UseExternalOnly

useApiExceptions

This will enable the throwing exceptions mechanism for SDK fatal errors ( experimental ) Default: false

logger

API calls logger. Default null

language

The SDK language.

languageTts

The SDK TTS language. If empty is provided ( default ), the TTS will use the SDK language Default : ""

autoInitLiveDataSource

If SDK initializes with success then will call automatically "PositionService.dataSource = produceDefaultLiveDataSource ()". If this value is false then the SDK user must provide a DataSource to PositionService. Default : true

exceptionCallback

Callback that will be used by breakpad to notice if the dump was successfully saved or not.

allowOnline

When true, the DefaultNetworkProvider will allow online connections. Default value is true.

generateGPSLog

When true, GPS log is generated (NMEA format). Default value is false.

groupingSeparator

The grouping separator character. If null then the system locale grouping separator will be used.

decimalSeparator

The decimal separator character. If null then the system locale decimal separator will be used.