How To Prevent Powering Off An Android Device By Power Button?
I'm developing a security program that prevent moving phone without knowing its owner. When program is running when phone moves alarm will fire and show unlock screen to spot the a
Solution 1:
So is there any way to disable power button action?
There is no way for an ordinary Android application to prevent the power button from functioning, for blindingly obvious security reasons.
It is conceivable that there are ways to accomplish this on rooted devices. Also, if you create your own custom ROM, you can integrate your alarm feature into it, blocking the power button operation while in the alarm state.
Solution 2:
There is no way to work around this, because even if it was possible to prevent a shutdown, there would still be the option of simply removing the battery.
Post a Comment for "How To Prevent Powering Off An Android Device By Power Button?"