Shutdown menu by code

1k Views Asked by At

Is there a way to make the "Phone Options" menu ( the one that is showed when you long press the power button with power off / airplane mode ... ) show by code without having to root the phone ? The idea is just to show it.

2

There are 2 best solutions below

0
On

Same question was asked here: How to call power off,reboot dialog from application?

Answer in short: Can't be done.

Alternatively, use https://play.google.com/store/apps/details?id=nappent.apps&hl=de Require root though.

PS: I am answering this old question because it was the first hit I found.

1
On

Have a look at the PowerDialog source, as it shows you how it is implemented and what layouts have been used. I can't see why you couldn't create a widget or an app that has the same functions without rooting.