开发者

Reboot android device programmatically [duplicate]

开发者 https://www.devze.com 2023-03-16 08:10 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: Reboot the phone on a button click
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

精彩评论

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