开发者

Reboot android device programmatically [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

Reboot the phone on a button click

Is it possible to reboot a device pro grammatically.

开发者_如何学C

I just want to reboot the device on a button click.


Please try

try {
Runtime.getRuntime().exec("su");
  Runtime.getRuntime().exec("reboot");
} catch (IOException e) {
}  
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜