So I have a app that will display notifications but i’m having a little problem…
this is what I use to call this notification:
date = os.date( "\*t" )
\_G.dia = 5
\_G.mes = 12
if date.day == \_G.day and date.month == \_G.mes then
-- Options for iOS
local options = {
alert = "Wake up!",
badge = 2,
sound = "alarm.caf",
custom = { foo = "bar" }
}
-- schedule using seconds from now
local notification = system.scheduleNotification( 60, options )
local listener = function( event )
print( event.name ) -- ==\> "notification"
print( event.custom.foo ) -- ==\> "bar"
end
Runtime:addEventListener( "notification", listener )
end
This only works if my app is open… I have put in buildsettiings that the app don’t close if suspend
someone can help me? [import]uid: 23063 topic_id: 18717 reply_id: 318717[/import]