# How to prevent lock screen (disable standby button)

**URL:** <https://discourse.processing.org/t/how-to-prevent-lock-screen-disable-standby-button/33570>\
**Category:** Processing for Android\
**Created:** [November 17, 2021, 7:48am UTC](https://discourse.processing.org/t/how-to-prevent-lock-screen-disable-standby-button/33570 "2021-11-17T07:48:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigboss97](https://avatars.discourse-cdn.com/v4/letter/b/47e85d/32.png) [@bigboss97](https://discourse.processing.org/u/bigboss97)\
**Post date:** [November 17, 2021, 7:48am UTC](https://discourse.processing.org/t/how-to-prevent-lock-screen-disable-standby-button/33570/1 "2021-11-17T07:48:30Z")

</div>

I’m using Processing 3.5.4 in Android mode.  
I want the screen always on while my app is running, i.e. disable the phone power button to avoid accidentally locking the screen.  
How can I do that?

---

<div class="post-metadata">

**Author:** ![Patc](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/patc/32/16239_2.png) [@Patc](https://discourse.processing.org/u/Patc)\
**Post date:** [May 5, 2022, 6:22am UTC](https://discourse.processing.org/t/how-to-prevent-lock-screen-disable-standby-button/33570/2 "2022-05-05T06:22:44Z")

</div>

You can use wakelock to prevent your device from locking the screen, but I don’t know of disabling the power button is possible…

> **[Keep the device awake  |  Android Developers](https://developer.android.com/training/scheduling/wakelock#java)**

Hope it will be useful

[EDIT]

Maybe that’s what you’re looking for

> <https://stackoverflow.com/questions/8036701/how-to-disable-power-button>
