Unable to obtain the value of the key-value pairs

0 votes
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.

 

 
related to an answer for: Geo location push message
asked Aug 17, 2016 in App42 Community Support by tianchoh (10 points)

1 Answer

0 votes
Hi Tianchoh,

I am forwarding this to my development team to get you code snippet for the same. I will update you with the code snippet as soon as possible.

Regards,

Rajeev
answered Aug 19, 2016 by rajeev.etc (1,660 points)
Any update on the code snippet?
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...