# How to black out screen when users presses android overview button

**URL:** <https://forums.solar2d.com/t/how-to-black-out-screen-when-users-presses-android-overview-button/350848>\
**Category:** Android\
**Created:** [April 23, 2020, 5:33am UTC](https://forums.solar2d.com/t/how-to-black-out-screen-when-users-presses-android-overview-button/350848 "2020-04-23T05:33:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Klynt](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/k/c89c15/32.png) [@Klynt](https://forums.solar2d.com/u/Klynt)\
**Post date:** [April 23, 2020, 5:33am UTC](https://forums.solar2d.com/t/how-to-black-out-screen-when-users-presses-android-overview-button/350848/1 "2020-04-23T05:33:20Z")

</div>

Hi,&nbsp;

&nbsp;So I am in the middle of creating an app for androids which has a timed test function.&nbsp; 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).&nbsp; This allows them to still view the question and the timer stops while the app isn’t open.&nbsp; So, 2 questions here I guess.&nbsp; 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.&nbsp;

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

Any help would be appreciated. Thanks!

---

<div class="post-metadata">

**Author:** ![XeduR](https://forums.solar2d.com/user_avatar/forums.solar2d.com/xedur/32/256_2.png) [@XeduR](https://forums.solar2d.com/u/XeduR)\
**Post date:** [April 23, 2020, 7:14am UTC](https://forums.solar2d.com/t/how-to-black-out-screen-when-users-presses-android-overview-button/350848/2 "2020-04-23T07:14:23Z")

</div>

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:&nbsp;[https://docs.coronalabs.com/api/event/system/type.html](https://docs.coronalabs.com/api/event/system/type.html)

As for your timers,&nbsp;[https://docs.coronalabs.com/api/library/timer/performWithDelay.html](https://docs.coronalabs.com/api/library/timer/performWithDelay.html)&nbsp;doesn’t pause even if the app is suspended.

---

<div class="post-metadata">

**Author:** ![Klynt](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/k/c89c15/32.png) [@Klynt](https://forums.solar2d.com/u/Klynt)\
**Post date:** [April 23, 2020, 12:17pm UTC](https://forums.solar2d.com/t/how-to-black-out-screen-when-users-presses-android-overview-button/350848/3 "2020-04-23T12:17:18Z")

</div>

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