How to black out screen when users presses android overview button

Hi, 

 So I am in the middle of creating an app for androids which has a timed test function.  The problem is, during my debugging and testing, we identified that if a person is on a test question they can hit the androids over view button (the one that shows all open apps and you can swipe to close them).  This allows them to still view the question and the timer stops while the app isn’t open.  So, 2 questions here I guess.  First, is there a way to keep the timer going while the app isn’t in the forefront and second, is there a way to make the app image go blank during that overview mode so people can’t keep seeing the question. 

I’m currently using a parentscene and show/hiding overlays for each question.  I assume i’d stick what ever code in the parentscene file. 

Any help would be appreciated. Thanks!

You could create a black rect when the app launches and just set it invisible. When you detect a suspend event, you just toggle it back to object.isVisible = true. If the code has the time to run during suspend event, then that’ll do it. Just reset it again on resume event.

Read: https://docs.coronalabs.com/api/event/system/type.html

As for your timers, https://docs.coronalabs.com/api/library/timer/performWithDelay.html doesn’t pause even if the app is suspended.

Awesome, thanks I’ll look into giving this a try!