Etan
Etan

Reputation: 11

Block the screen from turning on your Android phone

I develop an Android application in Java, using the Level 21 API (Lollipop), which aims to prevent third parties from manipulating the phone to turn on the screen.

I would like to point out that I am a beginner in the field of Android mobile application development. Would you have any solutions to suggest and explain to me to prevent the screen from turning on ?

• I explored various methods to achieve this goal, including using the PowerManager coupled with the goToSleep method to put certain elements of the device to sleep however, this technique is obsolete.

• I also tried using PowerManager with WakeLock to lock the state of certain items on the device, but this did not produce the desired results and many of the options are also obsolete.

• Finally, I used the Force-lock method in xml to turn off the screen, but this does not lock it into a permanent state.

Upvotes: 1

Views: 87

Answers (0)

Related Questions