create

fun create(context: Context, apiKey: String, authenticationServerUri: Uri? = null): Hazards

Creates a Hazards with the custom configuration.

Important: This is a Public Preview API. It may be changed or removed at any time.

Parameters

context

Android context.

apiKey

API key for the Hazards Locations API.

authenticationServerUri

Optional authentication URI key for the Hazards Locations API.


fun create(mqttDataProvider: MqttDataProvider, postDispatcher: CoroutineDispatcher = Dispatchers.Main, backgroundDispatcher: CoroutineDispatcher): Hazards

Creates a Hazards with the custom configuration.

Important: FOR TESTING PURPOSES ONLY.

Parameters

mqttDataProvider

Instance of MqttDataProvider.

postDispatcher

Dispatcher for API requests.

backgroundDispatcher

Dispatcher for background data processing.