Hey guys is there a way to intercept shut down to make the user enter password if the state is in the locked state? Its just that I am engineering an anti-theft app and would to disable shut down from lock screen while the device is in the locked state. Is there a way of achieving this with Android Java. I tried listening on the shut down intent but the device does not even give the code in the OnRecieve to execute

Recommended Answers

All 2 Replies

Have to write no. If I press and hold the power button long enough, both iPhone and Android will power down. Locked or not. To override this would require a change to the hardware on the phone. Why is this in hardware? Computers can lock up so there needs to be a way to power down in spite of what the CPU wants to do.

I have a Galaxy A10 and I tried holding the power button long enough for the device to go off but it did not. Samsung are really good at this

commented: Great find. So far over a few hundred phones I've been able to force shutoff. +16
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.