重新启动Android设备编程重新启动、设备、Android

2023-09-06 18:53:18 作者:食言犯

可能重复:结果  重新启动手机上的一个按钮,点击

是否有可能语法重新启动设备亲。

Is it possible to reboot a device pro grammatically.

我只想重新启动装置上的按钮点击。

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

推荐答案

请尝试

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