0

There any way to link the power button with a button in android app, leastways asking the user if he want turn off or reboot the device, a button for indirectly the user access options "turn off" or "reboot".

I want it for when the battery temperature is so high, show a notification and when touch it, show the options "turn off" or "reboot" like when you press the power button.

is there some way to do it? thanks

  • I don't think you can without root – Eluvatar Aug 29 '14 at 19:45
  • possible duplicate of [Power-Off or Restart an android device via Code/Program?](http://stackoverflow.com/questions/6305491/power-off-or-restart-an-android-device-via-code-program) – r2DoesInc Aug 29 '14 at 19:48
  • possible duplicate of [How to call power off,reboot dialog from application?](http://stackoverflow.com/questions/4791790/how-to-call-power-off-reboot-dialog-from-application) – njzk2 Aug 29 '14 at 19:48
  • 1
    If the battery temperature exceeds a certain level, the device will shut itself off. Before it gets to that point though the system will throttle down all the clocks. (This is why benchmark test runs often involve refrigerators.) – fadden Aug 29 '14 at 19:53

1 Answers1

2

No. If this was possible, it would be very very bad.

duplicate of Power-Off or Restart an android device via Code/Program?

Community
  • 1
  • 1
r2DoesInc
  • 3,759
  • 3
  • 29
  • 60