It will help if you provide more details for others (and staff). Which exact plugin, “plugin.notifications.v2”? Which platform, iOS or Android? What does your “config.lua” file look like? Etc.
local notifications = require( "plugin.notifications.v2" ) local deviceToken = notifications.getDeviceToken() local launchArgs = ... local function onNotification (event) if event.type == "remoteRegistration" then -- device registered deviceToken = notifications.getDeviceToken() native.showAlert("remoteRegistration", deviceToken, { "OK" }) else -- A push notification received native.showAlert("Push received", "message", { "OK" }) end end if ( launchArgs and launchArgs.notification ) then onNotification ( launchArgs.notification ) end notifications.registerForPushNotifications( { useFCM=true } ) -- Set up a notification listener. Runtime:addEventListener("notification", onNotification)
The primary issue I see is that you have a separate “application” table nested in the main “application” table within “config.lua”. That is not the correct structure… there should only be one top-level “application” table which contains the various child tables.