This seemed to work for me:
try {
Process proc = Runtime.getRuntime().exec(new String[] { "su", "-c", "reboot" });
proc.waitFor();
} catch (Exception ex) {
Log.i(TAG, "Could not reboot", ex);
}
More Related Contents:
- Android BroadcastReceiver, auto run service after reboot of device
- Android AlarmManager after reboot
- Start AlarmManager if device is rebooted
- Restarting a device programmatically
- Why does my app throw an `android.permission.REBOOT SecurityException`?
- App crashes when trying to connect to Neura service [closed]
- “Default Activity Not Found” on Android Studio upgrade
- How to increase storage for Android Emulator? (INSTALL_FAILED_INSUFFICIENT_STORAGE)
- How to use 3G Connection in Android Application instead of Wi-fi?
- How to make a Scroll Listener for WebView in Android
- Missing “/extras/google/google_play_services/libproject” folder after update to revision 30
- Changing position of the Dialog on screen android
- VectorDrawable – is it available somehow for pre-Lollipop versions of Android? [closed]
- How to create a popup window (PopupWindow) in Android
- Use camera flashlight in Android
- Use external fonts in android
- Animation in Notification bar Custom View
- How to get charles proxy work with Android 7 nougat?
- One OnClickHandler for multiple Buttons
- Android – copy existing project with a new name in Eclipse
- How to use Data Binding and Kotlin in Android Studio 3.0.0
- Issues with Android TabHost Example
- Cannot launch AVD in emulator:QT library not found
- Glass voice command nearest match from given list
- Application Launch Count
- how to open particular screen on clicking on push notification for flutter
- Error “package android.support.v7.app does not exist”
- Can’t update Eclipse ADT to 22
- Shared preferences between two processes of the same application
- Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]