Android push notifications unregister device | Community
Skip to main content

Android push notifications unregister device

  • April 22, 2024
  • 1 reply
  • 0 views

Volodymyr14

Hi!
We are using Support SDK for Android. We enabled push notifications as described in the docs: https://developer.zendesk.com/documentation/classic-web-widget-sdks/support-sdk/android/handle_push_notifications_wh/

Push notifications are working fine, but we have issues with device unregistration on user logout. We  call unregisterDevice SDK method, but onSuccess callback is never called. It happens because for some reason there is no registered device ID in PushDeviceIdStorage. If we call isRegisteredForPush() method in onSuccess callback of register device method, it still returns false:

Zendesk.INSTANCE.provider().pushRegistrationProvider().registerWithDeviceIdentifier(result, new ZendeskCallback<String>() {
   @Override
   public void onSuccess(String result) {
    println("Zendesk.INSTANCE.provider().pushRegistrationProvider().isRegisteredForPush()") // false

   }

   @Override
   public void onError(ErrorResponse errorResponse) {

   }

Could you suggest what we are doing wrong?

1 reply

Volodymyr17

Any updates about this issue?