Hi Rajeev,
Thanks for your reply. I have tried with these value pair but still cannot extract the data during notification. Are you able to help? My code in main.lua is as follows:
local function onNotification( event )
if event.type == "remoteRegistration" then
Constants.DeviceToken = event.token
_G.PushToken = event.token
elseif event.type == "remote" then
native.showAlert("Additional Data", event.custom.app42_message, {"OK"})
elseif event.type == "local" then
native.showAlert( "Message", "Local Message to you" , {"OK"} )
end
end
Runtime:addEventListener( "notification", onNotification )
local launchArgs = ...
if ( launchArgs and launchArgs.notification ) then
onNotification( launchArgs.notification )
end
Thanks & regards.