I am making an Android app that needs to have the phone reboot or turn off when a button is clicked. Is this possible? Or will the phone require root access?
If your device is rooted device then you can use below code.
Runtime.getRuntime().exec(new String[]{"/system/bin/su", "-c", "reboot now"});