Restarting a device programmatically

The permission you required is not related to your reboot method, as your method requires a rooted phone (with su). To reboot the phone, require the permission as you did, but call PowerManager#reboot. PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); pm.reboot(null);

Start AlarmManager if device is rebooted

Create Boot Receiver using following code : public class BootBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context pContext, Intent intent) { if(intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)){ // Do your work related to alarm manager } } } In your Manifest, register this Broadcast receiver : <receiver android:name=”com.yourapp.BootBroadcastReceiver” android:enabled=”true” > <intent-filter> <action android:name=”android.intent.action.BOOT_COMPLETED” /> </intent-filter> </receiver> And don’t forget to … Read more

Android AlarmManager after reboot

I’m not sure if I understand the boot receiver and how to then restart all the alarms. Just call your code to call setRepeating() (or whatever) on AlarmManager. For example, in this sample project, PollReceiver is set to receive BOOT_COMPLETED. In onReceive(), it reschedules the alarms: package com.commonsware.android.schedsvc; import android.app.AlarmManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import … Read more

iphone reboot programmatically

I have finally found a way to programmatically restart an iOS device without rooting a device!!!! The command line tool to restart an iOS device is called libimobiledevice: http://krypted.com/mac-os-x/use-libimobiledevice-to-view-ios-logs/ It is truly amazing. One snag I ran into while installing was trying to install this line: brew install -v –devel –fresh automake autoconf libtool wget … Read more

Windows Installer-Avoid FileinUse dialog box when Installing a package

“Short” Answer Essentially: you could 1) run completely silently (suppresses the files-in-use dialog), 2) shut down locking applications gracefully (application update to allow graceful shutdown – with or without restart manager support), 3) ensure proper service control (if dealing with services), 4) force-kill running processes (the “sledgehammer-approach”), 5) abort setup if locks are detected, 6) … Read more