pusher / push-notifications-android

Android SDK for Pusher Beams
https://www.pusher.com/beams
MIT License
21 stars 22 forks source link

`unsubscribeAll` potentially not working #56

Closed luismfonseca closed 5 years ago

luismfonseca commented 5 years ago

Using the SDK version 1.0.1 and the following code:

public void unsubscribeNotifications() {
    PushNotifications.start(getApplicationContext(), Constants.BEAM_INSTANCE_ID);
    PushNotifications.unsubscribe("users."+String.valueOf(DataManager.getInstance().getUserID()));
    PushNotifications.unsubscribeAll();
}

We got a customer report that the device was not being unsubscribed from the particular user id, nor from all the others after PushNotifications.unsubscribeAll().

Possible multiple calls to the PushNotifications.start?

avidenov commented 5 years ago

I have a similar issue, PushNotifications.unsubscribeAll() is not working. I also have multiple calls to PushNotifications.start

At the moment I'm using PushNotifications.unsubscribe(interest) which is working.

julioromano commented 5 years ago

I can confirm PushNotifications.unsubscribeAll(); is not working on v1.0.1. I'm calling PushNotifications.start() only once. Possibly this https://github.com/pusher/push-notifications-android/pull/60 fixes it.