Code example for PowerManager

Methods: reboot

0
                    Log.i(TAG, "set message received: " + msg.arg1);
 
                    // reboot 
                    PowerManager pm = (PowerManager) mContext
                            .getSystemService(Context.POWER_SERVICE);
                    pm.reboot("recovery");
                    pm.reboot(null);
                } 
            } catch (Exception e) {
                // Log, don't crash! 
                Log.e(TAG, "Exception in TestWorkerHandler.handleMessage:", e);
            } 
        } 
    } 
}