How to detect whenever the player left the game but the game is still open

Hello, good greetings to everyone.

I certainly need help, to know how to detect whenever the player left the game but the game is still open so that i can pause the game while he/ she is busy.

For example is when incomming calls interrupt the player while playing the game, or when the recent tab button, or home button was pressed so that temporarily, they can compose text messages, do something etc, or lock button was pressed. When such things happened, I simply need the game to pause. How can I do that?Thank you.

Hi,
You just need to handle the suspension:
https://docs.coronalabs.com/api/event/system/type.html

You need to pause all timers and transitions manually.
Then you can resume everything on app resuming.

Thank you very much