Hello Guys,
Notification v2 plugin issue on Android while App is not in Memory
I am using Corona SKD build : 2018:3353
I am going to implement Corona Plugin notification v2 in my App.( with FCM)
I just tested Corona Plugin v2 on my Android 5.0 and Android 8.1 devices
When i send test notification from firebase cloud messaging portal
Android 8.1 device got notification on All states
BUT My Android 5.0 device NOT getting notification if App is not in memory.
(for Android 5.0 , getting notification if App is Active or running in background)
main.lua :
local notifications = require('plugin.notifications.v2') local function notificationListener( event ) print('notificationListener : Event:' , event.type) if event.type=="remoteRegistration" then local ts=notifications.getDeviceToken() print("notificationListener : device Token : ",ts) end end Runtime:addEventListener('notification', notificationListener) timer.performWithDelay( 4000, function() local ts=notifications.getDeviceToken() if (ts == nil) or (ts == "unknown") then notifications.registerForPushNotifications({useFCM=true}) timer.performWithDelay(2000,function() ts=notifications.getDeviceToken() doAnalytics() end) end end)
build.settings :
settings = { orientation = { default = "portrait", supported = { "portrait" } }, plugins = { ["plugin.notifications.v2"] = { publisherId = "com.coronalabs" }, }, android = { useGoogleServicesJson = true, }, }
How soon can CoronaLabs fix this so I can release my new app ?
Thank you.
Bhavin