for my app i want to stop the screen off function
yes i just want to make it(Screen off function by pressing power button) disable that when user press power but and my app is running then screen must not off will give an toast message is it possible?
Goal :
- Disable auto screen timeout.
Done using this
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
now my first question is when my app will finish() time out will reset or screen will always on
2. Still using this user will be able to make screen off My second question is
Can i prevent user to do this and instead of screen get off an alert message is shown