Hello,
I tried to implement push notification system with corona one signal plugin. it is work on all of my devices with different android versions except one. The ASUS Zenfone(ASUS_Z00AD) ! On this device, ‘remoteRegistration’ event does not fire/trigger. After putting some debug logs for detecting problem, I found that the listener that was set for ‘notification’ event, does not called on this device!
Here is my code:
function didReceiveRemoteNotification(message, additionalData, isActive) end local OneSignal = require("plugin.OneSignal") OneSignal.Init(Constants.ONE\_SIGNAL\_APPLICATION\_KEY, Constants.GOOGLE\_PROJECT\_NUMBER, didReceiveRemoteNotification) local function coronaNotificationListener( event ) local eventType = event.type print("EVENT TYPE ::: ", event.type) if eventType then -- registration if eventType == "remoteRegistration" then print("remoteRegistration") end end end Runtime:addEventListener( "notification", coronaNotificationListener )
Can you check your config.lua for google = { projectNumber = “some_numer_here” }? If you have this I recommend removing it Corona is probably registering with it. Tn our plugin is registering again which will cause the other project number to become unregistered.
Since OneSignal users it’s own native Java code it don’t rely on any of the Corona events.
Can you check your config.lua for google = { projectNumber = “some_numer_here” }? If you have this I recommend removing it Corona is probably registering with it. Tn our plugin is registering again which will cause the other project number to become unregistered.
Since OneSignal users it’s own native Java code it don’t rely on any of the Corona events.