Can I run codes while the app is in background?

I have read some posts here about this, but they are very old. So very simple question can I run codes while the app is in background?

If not, can i know when the app will go on background? My ideia is to, save the time when the app goes on background and later when the user come back I can “run” everything. Making it look like the app was runing on background.

Thanks for the help!

  1. Corona apps are foreground only.

  2. Yes, you can set a listener to capture suspend, resume, etc.

See here: 

  1. Corona apps are foreground only.

  2. Yes, you can set a listener to capture suspend, resume, etc.

See here: