> For the complete documentation index, see [llms.txt](https://doc.batch.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.batch.com/developer/technical-guides/how-to-guides/mobile/android-specific/how-to-allow-users-to-unsubscribe-from-push-notifications-on-android.md).

# How to allow users to unsubscribe from push notifications on Android?

You may want to offer your users a system to disable push notifications from your app.

## 1. Redirect users to the phone's settings (recommended)

To ensure consistency between the notification opt-in status shown in your app and the system settings, we recommend [redirecting users to the phone's settings](https://developer.android.com/reference/android/provider/Settings#ACTION_APP_NOTIFICATION_SETTINGS) to manage their notification preferences. To get the right toggle switch state, use [the following method](https://developer.android.com/reference/androidx/core/app/NotificationManagerCompat#areNotificationsEnabled\(\)).

## 2. Disable notifications display at the SDK level

On Android, the notifications display is managed at the SDK level. So, you can also choose to allow users to disable push notifications directly from the app (through a toggle system, for example):

* If you're using **SDK v3 or higher**, refer to our [managing notification display documentation](https://doc.batch.com/developer/sdk/android/advanced/customizing-notifications#managing-notification-display).
* If you are still using **version 2** of the Batch SDK, we encourage you to migrate to v3 following our [migration guide](https://doc.batch.com/developer/sdk/android/advanced/3x-migration#managing-notification-display).

{% hint style="warning" %}
You can call those methods whenever you want during the runtime of your application.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.batch.com/developer/technical-guides/how-to-guides/mobile/android-specific/how-to-allow-users-to-unsubscribe-from-push-notifications-on-android.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
