HI Peach,
ok, maybe we come close, still I have some hope we mean the same.
You does say even the app is in the background you get a console output from the notification.
Right now i did a test app. (with 6 Secs Notification Delay)
a.Compiled with the 2011.704 Corona Nightly Build
b.run on a iPhone 4 V 5.0.1
- I opened the test app and closed it after 5 seconds.
- After 20 Seconds the Badge does change.
-> Without any output in my Console.
Hmmm, it really looks for me you do some magic tricks 
Here is my Source Code.
io.output():setvbuf("no")
display.setStatusBar( display.HiddenStatusBar )
print ("---- Simple Notification")
-- Options for iOS
local options = {
alert = "Wake up!",
badge = 2,
custom = { foo = "bar" }
}
-- schedule using seconds from now
-- here the listener comes only called when the Notification happens.
local notification = system.scheduleNotification( 10, options )
-- schedule using UTC (Coordinated Universal Time)
-- here, the Listener comes already called after 3 seconds, even the
-- Notification itself does happen 7 seconds later (10 seconds defined)
--local utcTime = os.date( "!\*t", os.time() + 10 )
--local notification = system.scheduleNotification( utcTime, options )
local listener = function( event )
print( event.name ) -- ==\> "notification"
print( event.custom.foo ) -- ==\> "bar"
end
Runtime:addEventListener( "notification", listener )
what I saw is when the scheduleNotification is called with a pre time in seconds.
The listener (and so console output) does happen as expected 10 seconds after start.
While instead when a os.date time is predefined, the listener comes already called
3 seconds after start (even the app is in the background, right)
and the final notification 7 seconds later (10 after start)
Thats what you may have misinterpreted as “I see something in the Console”.
I made another example;
io.output():setvbuf("no")
display.setStatusBar( display.HiddenStatusBar )
-- When the app is in the Foreground it does
-- create a new notification when one happend.
-- that does not work when the app is in the background.
-- Options for iOS
-- Badge not used, as it come set at times
-- badge Nr. is right now unknown
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;
-- Get Random Number
randomnum = math.random(0,999)
-- in Real each day 0am, the app does check how
-- many days left to a selected event in its database
-- set badge
native.setProperty( "applicationIconBadgeNumber",randomnum)
-- create next notification in 10 Seconds (in real next notification in 24 Hrs)
-- this is not called when app in Background !
options.alert = "Last Badge was Notification Nr: " .. randomnum
local notification = system.scheduleNotification( 10, options )
end
Runtime:addEventListener( "notification", listener )
-- start First Notification after 10 Seconds
local notification = system.scheduleNotification( 10, options )
that would create anyhow every 10 seconds a new Notification.
Works fine when the app is in the foreground.
When the app goes just once into background it stops working and also do not
continue when app is in foreground again.
LAST TEST
io.output():setvbuf("no")
display.setStatusBar( display.HiddenStatusBar )
print ("---- Repeated Notification")
-- Options for iOS
local options = {
alert = "Wake up!",
badge = 2,
custom = { foo = "bar" }
}
local utcTime = os.date( "!\*t", os.time() + 10 )
local notification = system.scheduleNotification( utcTime, options )
local listener = function( event )
print( event.name ) -- ==\> "notification"
print( event.custom.foo ) -- ==\> "bar"
local utcTime = os.date( "!\*t", os.time() + 10 )
local notification = system.scheduleNotification( utcTime, options )
end
Runtime:addEventListener( "notification", listener )
here I would expect, as I saw a Console Output, that every 10 Seconds
a new Notification is created. But instead, it does create every second a new notification,
while in Foreground, and while in Background, same as with the other tests… it stops working
Finally, I REALLY WISH and HOPE you are right
and its just a misunderstanding of mine,
make me understand please 
That API looks for me now still VERY buggy and should not be published like that.
Especially when worked with os.time it seems that the even listener is called immediately
and so there is anyhow no change to interfere when it really happens.
Should u able to do a simple app:
-App starts and every 10 Seconds the badge counter gets a random number.
- Just the Badge Number, no need for an Alert
- The Badge Number does change several time, while the app is in the Background.
Without predefining 1 Mio Counters for the next years to count up.
THAN I will just go deep into my knees and say Thank you !
Looking forward to hear soon from you. I really need to have that running soon.
Greets
Chris
[import]uid: 4795 topic_id: 18978 reply_id: 73798[/import]