java - How to call power off,reboot dialog from application? -
i call power off,reboot, etc.. dialog same default android dialog when push power button long application.
no need call directly reboot,power off, etc... application.
call dialog.
how call ? or how send power button key on application ?
in advance.
if @ source code, you'll see it's handled internally (phonewindowmanager.java , globalactions.java). there no interface whatsoever through api. in short: can't done.
if have reboot permission, can reboot phone directly powermanager.reboot()
, unlikely public app need functionality. wouldn't trust app reboot permission.
Comments
Post a Comment