a monitoring app

I am thinking to write a small app that need to keep running even if the user switches off the screen or put the app in the background (using other apps).

And the app can send some notification to a sleeping iPhone or when a user is using other apps.

Is it possible with Corona?

Hi @joe528,

At your basic description, this should all be possible. You can send local notifications (at a future time) to the device. Please see the following guide, if you haven’t already read it:

http://docs.coronalabs.com/guide/events/appNotification/index.html

Best regards,

Brent Sorrentino

But when the app is put in the background, isn’t it suspended?

When it’s in suspended mode, how does it keep running and monitoring something (before firing a local notification)?

Notifications are timer events where the OS will notify the user that something has happened.  Its really not a backgrounding process.  Corona SDK does not really support background modes. 

Thanks. I guess I can’t do this kind of monitoring app then.

It depends on what you’re trying to do actually.  Local Notifications get queued up in the system and the OS alerts you when its time.  Interacting with the notification wakes your app up.

However, what’s not supported is your app periodically waking up in the background, doing some calculations then going back to sleep.  When @joe528 said monitoring app, it sounds like the kind of thing that wakes up periodically does work and goes back to sleep with no user interaction.  That isn’t supported, but that’s also not what Local notification do. 

Hi @joe528,

At your basic description, this should all be possible. You can send local notifications (at a future time) to the device. Please see the following guide, if you haven’t already read it:

http://docs.coronalabs.com/guide/events/appNotification/index.html

Best regards,

Brent Sorrentino

But when the app is put in the background, isn’t it suspended?

When it’s in suspended mode, how does it keep running and monitoring something (before firing a local notification)?

Notifications are timer events where the OS will notify the user that something has happened.  Its really not a backgrounding process.  Corona SDK does not really support background modes. 

Thanks. I guess I can’t do this kind of monitoring app then.

It depends on what you’re trying to do actually.  Local Notifications get queued up in the system and the OS alerts you when its time.  Interacting with the notification wakes your app up.

However, what’s not supported is your app periodically waking up in the background, doing some calculations then going back to sleep.  When @joe528 said monitoring app, it sounds like the kind of thing that wakes up periodically does work and goes back to sleep with no user interaction.  That isn’t supported, but that’s also not what Local notification do.