Why don't I get notifications in HMS if I disable and re-enable them?

62 views Asked by At

Using "@hmscore/react-native-hms-push": "6.11.0-300", I have a utility in my app that opens notification settings, and user can enable/disable them.

The problem is that if

  1. a user has disabled notifications
  2. is sent a notification that is blocked
  3. then later re-enables notification

they still don't get notifications even though they should. If they weren't sent any blocked notification in step 2, the notifications work as normal.

If I follow an arcane set of reloads and restarts (not sure which ones work, and it seems random), the notifications are eventually enabled.

So is there a step I am missing that would enable the HMS notifications immediately after the permission is granted? I tried all combinations of manually triggering HmsPushMessaging.turnOnPush(), notifee.requestPermission() and HmsPushInstanceId.getToken('HCM') but no dice. Any idea what's this all about, and how it can be fixed?

0

There are 0 answers