triggerMockAccident

fun triggerMockAccident(context: Context, fairmaticAccidentConfidence: FairmaticAccidentConfidence, fairmaticOperationCallback: FairmaticOperationCallback?)

Triggers a fake accident. A fake accident will be invoked on the FairmaticListener after this function is called. Requires that the Fairmatic SDK is setup and a trip is in progress.

This function can be used to test the accident detection integration of your application.

Once setup finishes, the com.fairmatic.sdk.classes.FairmaticOperationCallback is called (if provided) with the result of the setup operation. Callback will be made on calling thread if it's Looper is already prepared, else the callback is made on the Main Thread.

Parameters

fairmaticAccidentConfidence
  • is the confidence level of the accident to trigger

fairmaticOperationCallback
  • called with the result of the operation when completed. In case of any error encountered, the result contains the relevant error details.


fun triggerMockAccident(context: Context, accidentConfiguration: FairmaticMockAccidentConfiguration, fairmaticOperationCallback: FairmaticOperationCallback?)

Triggers a fake accident. A fake accident will be invoked on the FairmaticListener after this function is called. Requires that the Fairmatic SDK is setup and a trip is in progress.

This function can be used to test the accident detection integration of your application.

Once setup finishes, the com.fairmatic.sdk.classes.FairmaticOperationCallback is called (if provided) with the result of the setup operation. Callback will be made on calling thread if it's Looper is already prepared, else the callback is made on the Main Thread.

Parameters

accidentConfiguration
  • is the configuration object defining the details of the collision

fairmaticOperationCallback
  • called with the result of the operation when completed. In case of any error encountered, the result contains the relevant error details.