initialize

fun initialize(context: Context, apiKey: String, @DrawableRes accidentUiScreenLogo: Int, notification: LRNotification? = null, tripDetectionNotification: LRNotification? = null, showAccidentUi: Boolean = true, accidentUiTextToSpeech: String? = null): SafeRider

Initialize the SafeRider SDK

Initialize SafeRider.sharedInstance with the provided configuration

Return

the SafeRider shared instance created

Parameters

context

the context

apiKey

the api key

notification

the notification configuration used to display the protection notification. Notification will also be used by SafeRider Service and shown to the user when the protection is active. If not provided, a default notification will be used

tripDetectionNotification

the notification configuration used to display the trip detection notification. Notification will also be used by Trip Detection Service and shown to the user when a trip detection analysis is running If not provided, a default notification will be used

showAccidentUi

if true, the library will handle all the accident workflow UI. If false, the client should handle the accident with a custom UI by listening to the protection status changes and calling the appropriate methods.

accidentUiScreenTitle

the title of the accident workflow screen. If not provided, the application name will be used

accidentUiTextToSpeech

the text to speech message used to play the alarm sound when an accident is detected. If not provided, only the alarm sound will be played