0

I am using the @react-native-firebase/messaging library for push notifications and it worked for me to request the permission, but I have a toggle, which should be able to revoke those permissions, so the device won't receive push notifications anymore.

I could in theory just remove the token from our firebase and then check, before sending a notification, if there is a messaging token to begin with, but I would like to know if it is possible to just revoke the permission.

Lucas Goldner
  • 617
  • 9
  • 29

1 Answers1

-2

There is no way of revoking the permssion as shown here.

There was before an API to do it but it's deprecated.

You should also consider that if a user doesn't give you permission to send notifications by answering no you can't even ask him later again. Having the permission should be in your interest to stay as it is. Just remove all tokens on your side so you don't have any information and data to send notifications to that device.

Tarik Huber
  • 7,061
  • 2
  • 12
  • 18