Prevent your phone or tablet from dimming the screen
To prevent your Android phone or tablet from dimming the screen, you have to place the following code in your java application file:
1 |
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); |
Leave a Reply