I'm new to android development. How can I prevent Android from locking while my application is in focus? When my application is out of focus I want to ensure than the android os will have its default behavior.
use
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
you can do this using
Activity.getWindow().addFlags().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With