Do push notification timers get reset everytime the app is opened?

Hello!

I’ve copied and pasted the code I’m using in my app below. I’m pretty much copied/pasted the code from https://docs.coronalabs.com/plugin/notifications-v2/scheduleNotification.html. In this example, the user gets a notification every 12 hours. 

Question: does the timer reset every time the app is opened? Let’s say I open the app at 06:00am and I’m assuming the timer gets scheduled for 06:00pm. If I open the app at 07:00am, does the timer for the notification get reset to 07:00pm? Or, will the user get two notifications at 06:00pm  and 06:00pm? 

I hope this question is clear!

local notifications = require( "plugin.notifications.v2" ) -- Get the app's launch arguments in case it was started when the user tapped on a notification local launchArgs -- Set up notification options local options = { alert = "Play What The Rebus to earn 30 brand new coins!", badge = 2, sound = "alarm.caf", custom = { foo = "bar" } } -- Schedule a notification to occur 60 seconds from now local notification1 = notifications.scheduleNotification( 43200, options ) -- Listen for notifications local function onNotification( event ) print( event.name ) if ( event.custom ) then print( event.custom.foo ) end end Runtime:addEventListener( "notification", onNotification ) -- The launch arguments provide a notification event if this app was started when the user tapped on a notification -- In this case, you must call the notification listener manually if ( launchArgs and launchArgs.notification ) then onNotification( launchArgs.notification ) end

A follow up question: I get a badge icon on iOS with the number 2. How do I clear the number notification?

See this guide: https://docs.coronalabs.com/guide/events/appNotification/index.html

Rob

native.setProperty( “applicationIconBadgeNumber”, 0 ) - got it!

A follow up question: I get a badge icon on iOS with the number 2. How do I clear the number notification?

See this guide: https://docs.coronalabs.com/guide/events/appNotification/index.html

Rob

native.setProperty( “applicationIconBadgeNumber”, 0 ) - got it!