> For the complete documentation index, see [llms.txt](https://docs.sentiance.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sentiance.com/important-topics/sdk/api-reference/android/crashdetection/crashdetectionapi.md).

# CrashDetectionApi

## CrashDetectionApi

### `invokeDummyVehicleCrash()`

> ```java
> void invokeDummyVehicleCrash()
> ```
>
> Invokes a dummy vehicle crash event. Use this method to test your vehicle crash detection integration.
>
> Calling this method will invoke the [VehicleCrashListener#onVehicleCrash(VehicleCrashEvent) ](/important-topics/sdk/api-reference/android/crashdetection/vehiclecrashlistener.md#onvehiclecrash)method of your [VehicleCrashListener](/important-topics/sdk/api-reference/android/crashdetection/vehiclecrashlistener.md) implementation, set via [setVehicleCrashListener(VehicleCrashListener)](#setvehiclecrashlistener).
>
> Note that this method is intended for testing your integration, and will only run on debug versions of your app (i.e. when the `android:debuggable` manifest flag is set to `true`).

### `isVehicleCrashDetectionSupported()`

> ```java
> boolean isVehicleCrashDetectionSupported()
> ```
>
> Returns whether vehicle crash detection is supported on the device.
>
> The result depends on multiple criteria, such as if vehicle crash detection is enabled for your app, and if the necessary sensors are present on the device.

### `setVehicleCrashDiagnosticListener()`

> ```java
> void setVehicleCrashDiagnosticListener(@Nullable final VehicleCrashDiagnosticListener listener);
> ```
>
> Sets a listener that is invoked when vehicle crash diagnostic data becomes available.
>
> Use this method to receive diagnostic data while vehicle crash detection is running.

| Parameters |                                                                                                                                                                                                                  |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| listener   | the [VehicleCrashDiagnosticListener](/important-topics/sdk/api-reference/android/crashdetection/vehiclecrashdiagnosticlistener.md) to receive diagnostic data. Set `null` to remove the previously set listener. |

### `setVehicleCrashListener()`

> ```java
> void setVehicleCrashListener(@Nullable VehicleCrashListener listener)
> ```
>
> Sets a listener that is invoked when a vehicle crash is detected.

| Parameters |                                                                                                                                                                                                      |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| listener   | A [`VehicleCrashListener`](/important-topics/sdk/api-reference/android/crashdetection/vehiclecrashlistener.md) to receive details about the crash. Set `null` to remove the previously set listener. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sentiance.com/important-topics/sdk/api-reference/android/crashdetection/crashdetectionapi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
