Examples
Install the module
Run the following command to install the module (make sure to install the core module beforehand):
npm i @sentiance-react-native/crash-detectionImport the module
import SentianceCrashDetection from "@sentiance-react-native/crash-detection";You can find a reference to all the types mentioned on this page here.
Vehicle Crash Event Detection
Listen to vehicle crash events:
import {addVehicleCrashEventListener} from "@sentiance-react-native/crash-detection";
const subscription = addVehicleCrashEventListener(vehicleCrashEvent => {
// New vehicle crash event
});
// Don't forget to unsubscribe, typically in componentWillUnmount
subscription.remove();Invoke a dummy vehicle crash event
Check if crash detection is supported
Vehicle Crash Diagnostic Data
Listen to vehicle crash diagnostic data.
Last updated