How to Stop Automatic Sleep on Android Devices

Asked 1 years ago, Updated 1 years ago, 88 views

If you turn on the screen of the device and stay still on, the screen turns off automatically. I want to stop this, but I don't know what to do. Do you know anyone?

android screen

2022-09-22 21:58

1 Answers

In the onCreate() part, getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); You can add that.


2022-09-22 21:58

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.