Notification Question

EDIT: just look my last post, thanks [import]uid: 23063 topic_id: 17587 reply_id: 317587[/import]

maybe beebe knows anything about it? [import]uid: 23063 topic_id: 17587 reply_id: 67064[/import]

What I would recommend is inserting print statements to make sure that things are downloading correctly, and you are receiving the proper conditions that’s needed to trigger your notification.

Then, I’d go through this blog post line-by-line to make sure you’re scheduling and handling notifications properly. [import]uid: 52430 topic_id: 17587 reply_id: 67095[/import]

hey beebe, How can I constant check if I can activate my checkNotifications function?

If I use " Runtime:addEventListener( “enterFrame”, checkNotifications ) " it will lag my app right?

I’m tried to use " timer.performWithDelay " but every time that I suspend the app, the timer close too
any idea?

thanks [import]uid: 23063 topic_id: 17587 reply_id: 67102[/import]

I’m having a little problem to understand what should I put here:

[code]
local launchArgs = … – HERE

local function notificationListener( event )
– display alert that shows the event name and type:
native.showAlert( event.name, event.type, { “OK” } )

– do something here
end

– Listen for notification events:
Runtime:addEventListener( “notification”, notificationListener )

if launchArgs and launchArgs.notification then
– call the event listener manually:
notificationListener( launchArgs.notification )
end

what should I put in launchArgs ? it’s like an

local options = { alert = "Wake up!", badge = 2, sound = "alarm.caf", custom = { anythingYouWant = "Corona SDK Rocks!" } }

?

if someone knows what should I put in launchArgs I appreciate

thanks [import]uid: 23063 topic_id: 17587 reply_id: 67634[/import]

nobody?

I just need an example of what put into “launchArgs” [import]uid: 23063 topic_id: 17587 reply_id: 67781[/import]

no one knows?

please I realy need this =( [import]uid: 23063 topic_id: 17587 reply_id: 67857[/import]

Please beebe you are the only one that can answer me, I tried to ask in forum for somebody else but seens no one knows

I just need an example to put in launchArgs [import]uid: 23063 topic_id: 17587 reply_id: 68420[/import]

If your app needs to monitor notifications while not in the foreground (e.g. in standby mode, or if you’re in another app), then you need to make sure launchArgs is the FIRST line in your main.lua.

Here’s an example:

local launchArgs = ...local function notificationListener( event ) -- display alert that shows the event name and type: native.showAlert( event.name, event.type, { "OK" } ) -- do something hereend-- Listen for notification events:Runtime:addEventListener( "notification", notificationListener )if launchArgs and launchArgs.notification then -- call the event listener manually: notificationListener( launchArgs.notification )end[/code]The only thing that should be assigned to launchArgs is ... (literally), and that should be the first line in your main.lua.Then, what you do is check to see if there were any launchArgs (which will hold notification event data, if a notification was recieved), and then manually invoke your notification listener (as shown in the example).Hope that helps!P.S. Full explanation of launchArgs in the following blog post: http://blog.anscamobile.com/2011/10/daily-builds-update-626-631/ [import]uid: 52430 topic_id: 17587 reply_id: 68429[/import]