Expo push token

Please provide the following:

  1. SDK Version:46
  2. Platforms(Android/iOS/web/all):android/ios
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Hi, i currently have an expo app with a nodejs backend. when the user downloads my app i ask for notifications permission if granted a expo push token is stored in my db. when user logs out of my app that token gets deleted from db.

What if the user decides to close the notifications from the settings? Should i delete the token from db? or keep it? either way the notification does not get sent to the user.

If the user changes the settings on the notification channel or app to hide the notification, there’s no action you should take. Your app will not be notified when this happens, so there’s no event to listen to, so no opportunity to delete the token; nor is there an event to listen to if the user were to turn notification on again, meaning you would not have an opportunity to upload a new token until the user opened the app again.

Hi, thank you for getting back to me. I a user has notifications open and allows notifications, i store their expo token in my db. Then the user decides to disable notifications. Shouldnt i start receiving status DeviceNotRegistered ?

You may get it if the user accepts the notification permission and then later rejects it. If the user simply disables a notification channel, you should not receive this status. If you receive this status when sending a notification, you should remove the token from your system so you don’t sent it again.