Guys,
this is just a sample test… I just want to try an get a notification happening every 10 seconds…
So I have created a schedule notification and within the event notification I am adding a schedule notification…
but it doesn’t seem to work… any thoughts?
main.lua
local launchArgs = ...
local TextTest = display.newText("Test", 50, 50, native.systemFont, 12)
TextTest:setTextColor(255, 255, 255)
local counter = 0
local options = {
alert = "Wake up 1!",
badge = 1,
custom = { anythingYouWant = "Corona SDK Rocks1!" }
}
TextTest.text = counter
local function notificationListener( event )
counter = counter + 1
TextTest.text = counter
system.scheduleNotification( 10 , options )
end
Runtime:addEventListener( "notification", notificationListener )
system.scheduleNotification( 10 , options )
if launchArgs and launchArgs.notification then
-- call the event listener manually:
notificationListener( launchArgs.notification )
end
build.settings
[code]
settings =
{
iphone = {
plist = {
UIApplicationExitsOnSuspend = false
}
}
}
[/code] [import]uid: 67619 topic_id: 24788 reply_id: 324788[/import]