LogoLogo
ProductsUse casesDocsSupport
  • Introducing DriveKit
  • DriveKit Guides
  • Get started with drivekit
    • Trip recording lifecycle
    • iOS
      • 🚀Quick start
      • Advanced configurations
      • References
      • iOS DriveKit Demo App
    • Android
      • 🚀Quick start
      • Advanced configurations
      • References
      • Android DriveKit Demo App
      • Android 15 Migration guide
      • Android 14 Migration guide
      • Troubleshooting
  • Trip analysis
    • Introduction
    • iOS
      • Permissions
      • Trip management
      • TripListener
      • Crash Detection
      • Beacon usage
      • Bluetooth usage
      • Custom metadata
      • References (iOS)
    • Android
      • Runtime permissions
      • Trip management
      • TripListener
      • Crash Detection
      • Beacon usage
      • Bluetooth usage
      • Custom metadata
      • References (Android)
    • User interface
      • iOS
        • Get started
        • Working hours
        • Driver alert in case of crash
        • Trip recording widget
        • Location sharing
      • Android
        • Get started
        • Working hours
        • Driver alert in case of crash
        • Trip recording widget
        • Location sharing
    • REST services
      • Trip
      • References
    • Trip Simulator
      • iOS
      • Android
  • PERMISSIONS UTILS
    • Introduction
    • User interface
      • iOS
        • Get started
        • Main configurations
      • Android
        • Get started
        • Main configurations
  • COMMON UI
    • Introduction
    • iOS
      • Get started
    • Android
      • Get started
    • References
  • DRIVER DATA
    • Introduction
    • iOS
      • Get started
      • References (iOS)
    • Android
      • Get started
      • References (Android)
    • User interface
      • iOS
        • Get started
        • Advanced configurations
        • Trips widgets
        • My Synthesis
        • My Driver Profile
      • Android
        • Get Started
        • Advanced configurations
        • Trips widgets
        • My Synthesis
        • My Driver Profile
  • Driver Data Timeline UI
    • Introduction
    • iOS
      • Get started
    • Android
      • Get started
  • Vehicle
    • Introduction
    • iOS
      • Get started
      • Vehicle management
      • Beacon management
      • Bluetooth device management
      • Odometer
      • References (iOS)
    • Android
      • Get started
      • Vehicle management
      • Beacon management
      • Bluetooth device management
      • Odometer
      • References (Android)
    • User interface
      • iOS
        • Get started
        • Main configurations
        • Advanced configurations
      • Android
        • Get started
        • Main configurations
        • Advanced configurations
  • DRIVER ACHIEVEMENT
    • Introduction
    • iOS
      • Get started
    • Android
      • Get Started
    • User interface
      • iOS
      • Android
  • CHALLENGE
    • Introduction
    • Important challenge rules
    • iOS
      • Get started
      • References (iOS)
    • Android
      • Get started
      • References (Android)
    • User interface
      • iOS
        • Get started
      • Android
        • Get started
  • GROUP
    • Introduction
    • iOS
      • Get started
    • Android
      • Get started
  • React Native
    • Get started
    • Integration
  • Flutter
    • Get started
    • Integration
  • Push services
    • Introduction
    • Push Trip Data
    • Push Deleted trip
    • Push Crash Data
    • Push Diagnosis Data
  • ADMIN SERVICES
    • Beacon
      • Add
      • Replace
      • Delete
      • Configuration
    • Challenges
      • List of challenges
      • Challenge details
      • Registered users
      • Challenge ranking
      • Users' progress
      • Definitions
    • Customer
      • Activity timeline
    • Driver
      • Timeline
      • Synthesis
      • Identity
      • Status
      • Add or update a metadata
      • Vehicles
      • Profile
      • Application diagnoses
    • Drivers
      • Account
      • Statistics
      • Ranking
      • Expired accounts
    • Group
      • Timeline
      • Synthesis
    • Trips
      • Add or update a metadata
      • Delete a metadata
    • Vehicle
      • Create
      • Characteristics
      • Configuration
      • Statistics
      • Update mileage
      • Tire and brake wear update
      • References
  • Crashes
    • Annotate a crash
    • Revoke crash location URL
  • ENTERPRISE SERVICES
    • Introduction
    • Teams
      • Create a team
      • List of teams
      • Enable or disable a team
    • Hyper-admins
      • Create a hyper-admin
      • List of hyper-admins
      • Delete a hyper-admin
    • Monitoring
      • Get a push trip data report
      • Get a push crash data report
      • Request to retry failed trips
      • Request to retry failed crashes
      • Get the status of a task
  • Release notes
    • Changelog
      • iOS
      • Android
      • UI iOS
      • UI Android
Powered by GitBook
On this page
  • Principle
  • Enable crash detection
  • Verify that the feature is available
  • Configure crash detection feedback
  • Listening to Crash events

Was this helpful?

Export as PDF
  1. Trip analysis
  2. iOS

Crash Detection

Principle

Crash detection features, included into the DriveKit Trip Analysis component, is able to collect and analyse smartphone sensors data to automatically detect when a car accident occurs.

DriveKit Trip Analysis analyzes signals from the GPS sensor and also from the motion sensors (accelerometer, gyrometer and magnetometer).

This feature is enabled if the following conditions are fulfilled:

  • Your API key has the access rights to use this service;

  • You have enabled the feature by following the instructions described in this section;

  • A trip has been detected and is being analysed.

  • The smartphone's sensors are functional.

  • The SDK is able to check the status of the required sensors.

The crash detection steps are:

  1. A trip is detected automatically or started manually and the trip recording starts.

  2. The crash feature detects a potential collision based on motion sensors.

  3. The GPS and motion data are pushed to the backend analysis services in charge of the signal processing and crash confirmation.

  4. The SDK receives a crash analysis service response with a status.

  5. If the crash is confirmed, the Trip analysis component can display a survey to ask the driver whether he needs assistance. This is an optional feature.

Enable crash detection

If the crash detection configuration is enabled for your company, your API key carries out the feature access and the crash detection will be enabled accordingly.

However, you can deactivate and reactivate the function if necessary using a dedicated setting.

A method is available in DriveKitTripAnalysis to enable or disable the feature:

func activateCrashDetection(_ enable: Bool)

Verify that the feature is available

It is possible to check if the crash detection is available for your configuration by checking the following property:

var isCrashDetectionAvailable: Bool

This property returns true if:

  • the required smartphone sensors are available and up and running;

  • your API key is allowed to use the feature;

If this property returns false, DriveKit will not start crash detection feature even if it has been previously activated with activateCrashDetection().

Configure crash detection feedback

Trip Analysis offers a mechanism to ask the user for feedback when an accident is confirmed by the crash analysis service. Crash confirmation can be used to trigger a notification or display a screen which asks the driver to confirm the accident and whether assistance is required.

func enableCrashFeedback(config: DKCrashFeedbackConfig)

To disable the crash detection feedback, call the following method:

func disableCrashFeedback()

Listening to Crash events

TripListener protocol provides two callbacks for crash events:

To receive these callbacks, the smartphone must be connected to a mobile network and the accident detection feature must be enabled for your organisation's API key.

PreviousTripListenerNextBeacon usage

Last updated 2 months ago

Was this helpful?

The crash detection comes with an optional user interface to display an alert to the driver. This is described in the section.

To use this function, you simply need to enable the interface with the following method and a object:

crashDetected(crashInfo:), called when a crash event is detected

crashFeedbackSent(crashInfo:, feedbackType: , severity:), called when crash feedback is enabled and a confirmed crash is detected. This callback will contain crash information and the feedback from the user.

user interface
DKCrashFeedbackConfig
DKCrashInfo
DKCrashInfo
DKCrashFeedbackType
DKCrashFeedbackSeverity