How to keep your device's screen on android

Asked 2 years ago, Updated 2 years ago, 22 views

I don't want the device to turn off, but is it possible with the code?

android

2022-09-22 10:58

1 Answers

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); If you do this during the activity, it keeps turning on.


2022-09-22 10:58

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.