# Ensuring App Functionality on Specific Android Devices

{% hint style="info" %}
<https://android-developers.googleblog.com/2023/05/improving-consistency-of-background-work-on-android.html>
{% endhint %}

In recent years, smartphones have grown increasingly powerful, yet battery technology has struggled to keep pace. As a result, manufacturers have introduced various power-saving features to optimize battery life. While these features can help extend usage time, they may inadvertently impact the performance of apps running in the background. This can affect applications such as alarm clocks, health trackers, automation tools, and more.

Starting with Android 6 (Marshmallow), Google introduced Doze mode to streamline battery-saving behaviour across different devices. Despite this, some device manufacturers, including Xiaomi, Huawei, OnePlus, and Samsung, have implemented additional power-saving mechanisms that may affect app functionality. These custom solutions, while aimed at conserving battery life, may lead to unexpected behaviour in background tasks, sometimes disrupting the smooth operation of essential features.

As a developer, it’s important to be aware of these behaviours and account for them in your app design. **It is crucial that you account for these specialised permissions for these specific android devices. Failing to account for these may lead to the SDK not able to run backround services necessary for trip detection. Please not that the guidelines mentioned in the section are the latest understanding of Kruzr's team to ensure functionality on these devices. However, because of non uniform and limited documentation from the vendors, functionality may not be guaranteed even after making these changes in your app. Real world driving testing is highly recommend. In case of further support for these vendors, please contact out app support team at <hello@kruzr.co>.** This section of the documentation will try to guide you through best practices and strategies to ensure your app continues to perform as expected, even on devices with aggressive battery management settings.

{% hint style="warning" %}
**Note:** Device-specific power-saving settings and behaviours can change with new firmware updates or device models. We recommend regularly reviewing and testing your app on different devices to ensure compatibility and optimal performance.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.kruzr.co/building-an-android-app-with-kruzr-sdk/ensuring-app-functionality-on-specific-android-devices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
