I am creating app(only for Android 6) in which I have to give reboot functionality using button click. I am using following code:
PowerManager pm =(PowerMan
Process proc = null; try { proc = Runtime.getRuntime().exec(new String[] { "su", "-c", "reboot" }); try { proc.waitFor(); } catch (InterruptedException e) { e.printStackTrace(); } } catch (IOException e) { e.printStackTrace(); }