value not pass in notificationListener

I am working on the code below. Which is to detect if application is start from clicking on notification or not. So far, the  notificationPage  is showing properly. But it is not received the value from  params = { var1 = event.alert}. What do i do wrong?

local function notificationListener( event ) native.showAlert( "Message", event.alert, { "OK" }) if ( launchArgs and launchArgs.notification ) then print( "event via launchArgs" ) local function gaya( ) local option = { effect = "fade", time = 300, params = { var1 = event.alert} } storyboard.gotoScene( "notificationPage", option ) end timer.performWithDelay( 1000, gaya ) else print("event NOT via launchArgs") end end -- Listen for notification events: Runtime:addEventListener( "notification", notificationListener )

I am working on the code below. Which is to detect if application is start from clicking on notification or not. So far, the  notificationPage  is showing properly. But it is not received the value from  params = { var1 = event.alert}. What do i do wrong?

local function notificationListener( event ) native.showAlert( “Message”, event.alert, { “OK” }) if ( launchArgs and launchArgs.notification ) then print( “event via launchArgs” ) local function gaya( ) local option = { effect = “fade”, time = 300, params = { var1 = event.alert} } storyboard.gotoScene( “notificationPage”, option ) end timer.performWithDelay( 1000, gaya ) else print(“event NOT via launchArgs”) end end – Listen for notification events: Runtime:addEventListener( “notification”, notificationListener )

Not sure what your issue is, is the value of event.alert not getting passed to notificationPage? if your are getting the value of event.alert in the showAlert, maybe you should initialise the value of var1 just after that. I don’t think you can use var1 = “value” in your params

I am working on the code below. Which is to detect if application is start from clicking on notification or not. So far, the  notificationPage  is showing properly. But it is not received the value from  params = { var1 = event.alert}. What do i do wrong?

local function notificationListener( event ) native.showAlert( “Message”, event.alert, { “OK” }) if ( launchArgs and launchArgs.notification ) then print( “event via launchArgs” ) local function gaya( ) local option = { effect = “fade”, time = 300, params = { var1 = event.alert} } storyboard.gotoScene( “notificationPage”, option ) end timer.performWithDelay( 1000, gaya ) else print(“event NOT via launchArgs”) end end – Listen for notification events: Runtime:addEventListener( “notification”, notificationListener )

Not sure what your issue is, is the value of event.alert not getting passed to notificationPage? if your are getting the value of event.alert in the showAlert, maybe you should initialise the value of var1 just after that. I don’t think you can use var1 = “value” in your params