Local Notifications & Future Set Badges

Hi there,

old Topic, I just come into again.

To Set Badges also the app is in the Background?
AnyNews how to do that.

Once someone mentioned to set Future Local Notifications.

Thats not Prob, but it would only show the Option Text from the Notification

and I cant set a new Badge for example.

I would set new badges also for the future

like

io.output():setvbuf(“no”)

display.setStatusBar( display.HiddenStatusBar )

local options = {

   alert = “First created Notification”,

   custom = { foo = “bar” }

}

math.randomseed(1)

    

local myvariable = 0

local listener = function( event )

   – Console Output

   print( event.name )       – ==> “notification”

   print( event.custom.foo ) – ==> "bar;

      randomnum = math.random(0,999)

   native.setProperty( “applicationIconBadgeNumber”,randomnum)

 options.alert = "Last Badge was Notification Nr: " … randomnum

end

Runtime:addEventListener( “notification”, listener )

– start First Notification after 10 Seconds

local notification = system.scheduleNotification( 4, options )

local notification = system.scheduleNotification( 8, options )

local notification = system.scheduleNotification( 12, options )

local notification = system.scheduleNotification( 16, options )

local notification = system.scheduleNotification( 20, options )

The Notifications come up, but the SetProperty within the Listener is not called.

So is there any advice how I could set Badges even the app is in the Background

through Notifications or any other mockup?

Thanks

Chris

Have you read this guide?  http://docs.coronalabs.com/guide/events/appNotification/index.html

It covers badges and local notifications and should answer your questions.

Rob

Have you read this guide?  http://docs.coronalabs.com/guide/events/appNotification/index.html

It covers badges and local notifications and should answer your questions.

Rob