如何断电Android设备?设备、Android

由网友(独草孤花。)分享简介:怎么会关机通过java code Android设备?它甚至有可能?我是否需要特殊的权限来做到这一点?How could I power off an android device via java code?Is it even possible? Do I need special permissions t...

怎么会关机通过java code Android设备? 它甚至有可能?我是否需要特殊的权限来做到这一点?

How could I power off an android device via java code? Is it even possible? Do I need special permissions to do this?

推荐答案

目前在Android SDK中没有API,允许用户应用程序来做到这一点。

There is no API in the Android SDK to allow user apps to do this.

最近,你也许可以尝试将PowerManager.goToSleep().

The closest you could perhaps try would be PowerManager.goToSleep().

阅读全文

相关推荐

最新文章