All Collections
Push Notifications
Android
Allowing users to unsubscribe from push notifications on Android
Allowing users to unsubscribe from push notifications on Android

A simple method allows users to disable push notifications directly from the app (through a toggle system for example).

Claire avatar
Written by Claire
Updated over a week ago

You can call Batch.Push.setNotificationsType whenever you want in the runtime of your application.

EnumSet<PushNotificationType> set = EnumSet.of(PushNotificationType.NONE); // Disable all notifications

Batch.Push.setNotificationsType(set);

Typically, you can call this method when the user disables push notifications in the settings section of your app. 

Keep in mind that once you've set the notification type within Batch, you have to set it again to change it.


This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on batch.com and our blog.

Did this answer your question?