Understanding Local Notification and notification ID

I am working on creating local notifications for reminding the player when his stamina is full (So he can play more)

My question about the id that is returned when you schedule a future notification.  The documentation says the pointer can’t be saved between program runs. 

My question: What is considered a program run? I know that, at least on Android, some part of the app will run in the background unless you go to settings —> apps—> and force the app to stop.

For instance:

Open app

Notification scheduled

Close App Via “sliding off the screen”

Open app

Cancel notification via notificationID pointer

Can the pointer be saved across sessions in this way?

Thanks!

Kenny,

www.gameOfLoot.com

iOS / Android

The ID is a data type known as “Userdata”.  This is a pointer to allocated “C” memory (not  Lua memory).  As long as your app is in memory, that userdata variable will still point to the valid memory area.   If your app exits (crashes, or you double tap the home button and swipe it away), then your app restarts, the pointer, if you saved it would be invalid.  The data if you managed to save it would also be invalid.

Rob

Right o. Thanks.

The ID is a data type known as “Userdata”.  This is a pointer to allocated “C” memory (not  Lua memory).  As long as your app is in memory, that userdata variable will still point to the valid memory area.   If your app exits (crashes, or you double tap the home button and swipe it away), then your app restarts, the pointer, if you saved it would be invalid.  The data if you managed to save it would also be invalid.

Rob

Right o. Thanks.