1
可能重复:
Programmatically switching off Android phone关闭Android设备在特定时间
是否有可能写关闭的应用程序(不重新启动)的Android设备?例如,它播放一首歌曲,30分钟后自动关闭设备。
可能重复:
Programmatically switching off Android phone关闭Android设备在特定时间
是否有可能写关闭的应用程序(不重新启动)的Android设备?例如,它播放一首歌曲,30分钟后自动关闭设备。
这里已经aswered .... Why does my app throw an `android.permission.REBOOT SecurityException`?
除非你有厂商密钥签署您的应用程序/或者如果你的设备是rooted..it是不可能的草皮其关闭。
http://stackoverflow.com/questions/2927083/how-to-realize-the-shutdown-using-code/ - 这是你需要的。 – Malcolm