Turn off push notifications

How to turn off push notifications from application?
Need solution for ios and android.
I manage to get notifications with batch and sonar tutorial, but don’t know how to let user remove notifications from application.
Thnx

Create two function in your AppActivity.java or in which you are defining your Batch framework

public static void disablePushNotifications() {
	EnumSet<PushNotificationType> set = EnumSet.of(PushNotificationType.NONE);
	Batch.Push.setNotificationsType(set);
}

public static void enablePushNotifications() {
	EnumSet<PushNotificationType> set = EnumSet.allOf(PushNotificationType.class);
	set.add(PushNotificationType.ALERT);
	set.add(PushNotificationType.SOUND);
	set.add(PushNotificationType.LIGHTS);
	set.add(PushNotificationType.VIBRATE);
	Batch.Push.setNotificationsType(set);
}

Now call this functions from cpp, use JNI :smile:

Do you know solution for ios? in c++.

You can not do it in iOS AFAIK.
It should be enabled/disabled from the system settings.