For the complete documentation index, see llms.txt. This page is also available as Markdown.

Crash Insights

To learn about the Crash Insights feature, check out this page.

Prerequisites

The Crash Insights feature relies on additional library dependencies alongside the core SDK dependency. To start using this feature, you must first add these dependencies to you project.

iOS

This feature is included in the main SDK framework. No additional dependencies are needed.

Android

Open your app build.gradle file and add the Crash Detection dependency.

app/build.gradle
dependencies {
    implementation(platform('com.sentiance:sdk-bom:<sentiance-version>'))
    implementation('com.sentiance:sdk-crash-detection')
}
React Native

This feature is included after installing the following modules:

Flutter

This feature can be added by installing the following packages:

Utilize the Crash Detection APIs

In this section, you’ll find examples showing how to check whether vehicle crash detection is supported on a device, how to subscribe to crash event notifications, and additional details about the contents of a crash event and how to test your integration.

Check if Vehicle Crash Detection Is Supported

There are several reasons why vehicle crash detection may not be supported on the device. The two most common of these are:

  • the feature is not enabled for your app;

  • the device lacks the necessary sensors (e.g. accelerometer).

You can check to see whether vehicle crash detection is support on the device, as follows:

Subscribe for Vehicle Crash Events

In order to be notified of vehicle crash events, you can specify the listener that the SDK will invoke when it detects a vehicle crash.

Checkout Real-time Listeners to read more about implementing the SDK's Listeners

Crash Event Details

A crash event contains the time and location of the detected crash, in addition to a number of metrics to estimate the severity of the crash:

Speed at impact

The estimated speed of the vehicle before the impact, in m/s.

Magnitude

The magnitude of the impact, in m/s².

Delta-V

The estimated change in velocity at impact, in m/s.

Confidence

The level of confidence that the accelerometer signal reflects a true crash pattern (range 0 - 100). It is recommended to filter out events below the confidence of 50.

Severity

A categorical severity of the crash (low, medium, high).

Test Your Integration

The final step is checking your integration, to make sure that your vehicle crash listener is properly set up to handle crash events. Add the following method call in your app to trigger a dummy crash event.

This would invoke your listener, passing it a dummy crash event. You can test how your app handles the event at runtime.

Crash Detection Diagnostic Information

It’s also possible to subscribe to additional diagnostic data produced by the SDK to better understand the state and decision-making of the crash detection and to facilitate testing.

The result will reflect one of the following states:

  • Crash candidate detected

  • Crash candidate discarded - impact is too weak

  • Crash candidate discarded - transport mode is not a vehicle

  • Crash candidate discarded - pre-impact signal contains too much noise

  • Crash candidate discarded - speed before impact is too low

  • Crash candidate discarded - post-impact signal contains too much noise

  • Crash candidate discarded - speed after impact is too high

Last updated