title: How do I start service on Reboot?
body: <p>I am trying to automatically start an Android service when the device reboots.  I have tried to accomplish this using Receive_Boot_Complete permission, BroadcastReceiver with Boot_Complete intent action with no success.  I'm very well aware that after Android 3.0 apps are placed in a stopped state on reboot and therefore no receivers are able to run.  However, there are several mobile security apps such as <a href="https://play.google.com/store/apps/details?id=com.lookout" rel="nofollow">Lookout</a> that are run services and processes on reboot.  How are they able to accomplish this?</p>
  
  <pre><code>&lt;!-- Listen for the device starting up --&gt;
  &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/&gt;
      &lt;receiver android:name="com.tpss.beacon.BootCompleteReceiver"&gt;
              &lt;intent-filter&gt;
                        &lt;action android:name="android.intent.action.BOOT_COMPLETED"/&gt;
                        &lt;action android:name="android.intent.action.QUICKBOOT_POWERON" /&gt;
              &lt;/intent-filter&gt;
      &lt;/receiver&gt;     
  
  
    public class BootCompleteReceiver extends BroadcastReceiver{
      @Override
      public void onReceive(Context context, Intent intent) {
  
      context.startService(new Intent(context, UpdateGeofenceService.class));  
     }
  }   
  </code></pre>