On-Device Crash Detection Testing

Note: It's crucial to set up the correct crash handler/listener to ensure proper functioning of the ML-based version. The handlers are:

  • setVehicleCrashListener for Android

  • setVehicleCrashHandler for iOS

Real Driving

Before we begin, it's essential to emphasize that safety is paramount. Always obey traffic laws and drive responsibly.

Disclaimer and warning: Sentiance does not accept any liability for risky driving behavior. At all times, respect traffic laws.

Pre-Requisites

To perform this test, you'll need:

  • The Sentiance crash detection app installed on a compatible mobile phone.

  • The latest Sentiance mobile SDK integrated into the app (version Android 4.21.0 or iOS 5.12.1, or a related build with relaxed crash detection constraints).

  • Valid SDK credentials and crash detection enabled.

  • Proper phone settings: high accuracy location, no power saving or background restrictions, location and activity permissions granted.

  • Verify the app can detect trips by analyzing results from a regular car trip.

Test Scenario

In this scenario, we simulate a crash using the on-device crash detection feature. Please note that the driver should not hold the phone while performing this test.

  1. Confirm you are stationary.

  2. Drive at least 500 meters away from your current location to trigger a geofence exit.

  3. Confirm the geofence exit through the foreground notification (on Android).

  4. Drive beyond the 500-meter point at a speed exceeding 40 km/h (25 mph) for at least 20 seconds.

  5. Hold the phone steady to simulate a "Vehicle" motion.

  6. Do not move the phone to prevent incorrect motion detection.

  7. After 20 seconds of driving, begin to brake.

  8. About 1 second after braking, firmly shake the phone once while the speed is above 30 km/h (20 mph).

  9. Continue slowing down until you come to a stop. Do not accelerate.

  10. If movement is required, keep the speed under 5 km/h (3 mph).

  11. Ensure you stop within 250 meters of where you shook the phone.

  12. Stay stationary for at least 60 seconds without moving the phone.

  13. Wait an additional 2 minutes until the foreground notification disappears.

If the test fails, you can try again. It might take a few attempts to succeed.

Troubleshooting

To improve test results, you can:

  • Force stop the application and wait 5 minutes before the test.

  • Temporarily turn off location (system-wide) for 5 minutes, then turn it back on and wait another 5 minutes.

  • Open Google Maps or GPS test before and during the test to increase location accuracy.

  • Avoid shaking the phone a second time during a trip; wait until stationary, then start again.

GPS Spoofing

Pre-Requisites

Similar to the real driving section.

Test Scenario

This scenario involves using a GPS spoofing application for Android to simulate a crash. Make sure to follow the provided instructions for setting up the spoofing app and creating a route.

  1. Start the simulation using the spoofing app.

  2. Set the speed and other settings as instructed.

  3. Shake the phone firmly around the endpoint of the route.

  4. Wait for the simulation to complete and verify if a crash was reported by the SDK.

If unsuccessful, you can try the test again. It might take a few attempts to achieve the desired outcome.

Troubleshooting

To enhance GPS spoofing results, consider the following steps:

  • Toggle high-accuracy location setting during spoofing.

  • Turn off and then back on WiFi during spoofing.

  • Force stop all applications, including the spoofing app.

  • Adjust location mode settings.

  • Allow WiFi scanning for apps.

  • Experiment with the timing of shaking the phone.

  • Avoid using device-only location mode, as it may affect the Sentiance SDK.

Revoke activity permission to potentially increase the likelihood of the SDK reporting a crash.

Remember, accurate crash detection is critical for ensuring user safety, and these tests and troubleshooting steps aim to optimize its performance.

Last updated