Notifications plugin how to check refused notification by user

Hello every body.

I am testing “plugin.notifications.v2” with Firebase Cloud Messaging on iOs.

I receive notifications and all is perfect.

But when I refused notification when the popup asks if I want to enable push notifications. I keep on getting the notifications.

Here is the listener for handling incoming notifications :

local function onNotification (event) if (event.type == "remoteRegistration") then -- device registered FCMtoken = notifications.getDeviceToken() elseif (event.type == "remote") then -- show notification received only if user accepted (but how to check if user accepted?) native.showAlert("remote", event.alert, { "OK" }) end end notifications.registerForPushNotifications( { useFCM=true } ) -- Set up a notification listener Runtime:addEventListener ("notification", onNotification)

Is there a way to check if the user accepted the notifications?

Unfortunately, It’s not possible to check if the user has rejected notifications from the popup.

It’s a bit odd that you still get notifications if you reject them in the popup though. The only reason I can think of is that notifications for that particular device has been accepted at one point in time, and that setting is still in effect. It may be that if the notification setting is changed from one state to the other it takes some time for it to come into effect.