Search…
Detecting Vehicle Crashes
The Sentiance SDK can be configured to detect vehicle accidents/crashes during trips. You can be notified of these crash events by setting a callback as follows:
iOS
Android
1
// Signature
2
- (void)setCrashListener:(void (^)(NSDate *date, CLLocation *lastKnownLocation))crashCallback;
3
// Usage
4
[[SENTSDK sharedInstance] setCrashListener:^(NSDate *date, CLLocation *lastKnownLocation) {
5
// Handle vehicle crash event
6
}];
7
Copied!
1
sentianceSdk.setCrashCallback(new CrashCallback() {
2
@Override
3
public void onCrash(long time, @Nullable Location lastKnownLocation) {
4
// crash detected
5
}
6
});
Copied!
Last modified 2yr ago
Copy link