Hi,
i would like to change the Badge to a different Number when a
Notification happen.
right now using
local options = {
alert = "Pill Reminder",
badge = 1,
sound = "alert\_45.caf",
custom = { anythingYouWant = "My Days Rocks!" }
}
local myNotification = system.scheduleNotification( 2, options)
it does set the badge only when the app is in the background.
While my app is in the foreground it would call
local function notificationListener( event )
-- display alert that shows the event name and type:
native.showAlert("My Days", "Take your Pill", { "OK" } )
end
Runtime:addEventListener( "notification", notificationListener )
but would not change the Badge Number.
How would I make that the Badge Number of the Icon change, whatever the
app is in Foreground or Background?
In My case it would always happen when I Day change at 24:00 … if the
app is in foreground or background, doesn’t matter.
thx
chris
[import]uid: 4795 topic_id: 16399 reply_id: 316399[/import]
[import]uid: 52430 topic_id: 16399 reply_id: 61239[/import]