如何能够通过代码来重启Android手机?

String cmd = "su -c reboot";//让手机从启

     try {

         Runtime.getRuntime().exec(cmd);

    } catch (IOException e) {

    // TODO Auto-generated catch block

     new AlertDialog.Builder(this).setTitle("Error").setMessage(

        e.getMessage()).setPositiveButton("OK", null).show();

 }

posted @ 2013-09-16 11:11  LeeHonGee  阅读(3903)  评论(0编辑  收藏  举报