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?