FairmaticMockAccidentConfiguration

The configuration to trigger a mock collision using com.fairmatic.sdk.Fairmatic.triggerMockAccident. It contains the fields to set the vehicle type, collision severity, direction of impact, the confidence for the collision events sent in FairmaticBroadcastReceiver.onPotentialAccident and FairmaticBroadcastReceiver.onAccident and the delay between the callbacks.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setDelayBetweenCallbacksSeconds(delayBetweenCallbacksSeconds: Int)

The delay in seconds between the potential and final accident callbacks. If the application doesn't support FairmaticConfiguration.setImplementsMultipleAccidentCallbacks, this value is ignored.

Link copied to clipboard
Link copied to clipboard

The confidence to use for FairmaticBroadcastReceiver.onAccident callback.

Link copied to clipboard
fun setFinalCallbackConfidenceNumber(finalCallbackConfidenceNumber: Int)

The confidence number to use for FairmaticBroadcastReceiver.onAccident callback.

Link copied to clipboard

The confidence to use for FairmaticBroadcastReceiver.onPotentialAccident callback. If the application doesn't support multiple accident callbacks, this value is ignored.

Link copied to clipboard
fun setPotentialCallbackConfidenceNumber(potentialCallbackConfidenceNumber: Int)

The confidence number to use for FairmaticBroadcastReceiver.onPotentialAccident callback. If the application doesn't support multiple accident callbacks, this value is ignored.

Link copied to clipboard
Link copied to clipboard

A handy way to simulate the case where the final callback invalidates the potential accident callback. See FairmaticConfiguration.setImplementsMultipleAccidentCallbacks for a detailed explanation of invalidation. If the application doesn't support FairmaticConfiguration.getImplementsMultipleAccidentCallbacks, a callback with 0 confidence is still be sent. However, such a callback will never be sent by the SDK for a real collision.