title: Boot Receiver doesn't work
body: <p>First off, please don't mark this as duplicate, I have tried to resolve the issue using several different questions here on SO, and tried each and every solution for this issue, over SO.</p>
  
  <p>Therefore, I reproduce my entire code here along with the logcat.</p>
  
  <p><strong>The Issue:</strong></p>
  
  <p>I am trying to write an application that will boot up on reboot of a device.
  I can see several applications receiving the BOOT_COMPLETED action in the logcat, but I can't see my application anywhere in logcat on device reboot.</p>
  
  <p><strong>Point to Note:</strong></p>
  
  <p>I have already launched my app once before testing through Device Reboot.</p>
  
  <p><strong>Code Files:</strong></p>
  
  <p>AndroidManifest:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.xyz.abc"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;receiver android:name="com.xyz.abc.autostart" android:enabled="true" android:exported="true"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
  
          &lt;activity
              android:name=".hello"
              android:label="@string/title_activity_hello" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  
          &lt;service
              android:name=".service"
              android:enabled="true" /&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Autostart.java</p>
  
  <pre><code>package com.xyz.abc;
  
  import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
  import android.util.Log;
  
  /**
   * Created by admin on 008, 8 May 2015.
   */
  public class autostart extends BroadcastReceiver
  {
      public void onReceive(Context context, Intent arg1)
      {
          Log.w("boot_broadcast_poc", "starting service...");
          context.startService(new Intent(context, service.class));
      }
  }
  </code></pre>
  
  <p>service.java</p>
  
  <pre><code>package com.xyz.abc;
  
  import android.app.Service;
  import android.content.Intent;
  import android.os.IBinder;
  import android.util.Log;
  import android.widget.Toast;
  
  /**
   * Created by admin on 008, 8 May 2015.
   */
  public class service extends Service
  {
      private static final String TAG = "MyService";
      @Override
      public IBinder onBind(Intent intent) {
          return null;
      }
      public void onDestroy() {
          Toast.makeText(this, "My Service Stopped", Toast.LENGTH_LONG).show();
          Log.d(TAG, "onDestroy");
      }
  
      @Override
      public int onStartCommand(Intent pIntent, int flags, int startId) {
          // TODO Auto-generated method stub
          Toast.makeText(this, "NotifyingDailyService", Toast.LENGTH_LONG).show();
          Log.i("bootbroadcastpoc","NotifyingDailyService");
  
          return super.onStartCommand(pIntent, flags, startId);
      }
  }
  </code></pre>
  
  <p>hello.java</p>
  
  <pre><code>package com.xyz.abc;
  
  import android.support.v7.app.ActionBarActivity;
  import android.os.Bundle;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.widget.Toast;
  
  
  public class hello extends ActionBarActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_hello);
          Toast.makeText(getBaseContext(), "Hello........", Toast.LENGTH_LONG).show();
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.menu_hello, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
  
          //noinspection SimplifiableIfStatement
          if (id == R.id.action_settings) {
              return true;
          }
  
          return super.onOptionsItemSelected(item);
      }
  }
  </code></pre>
  
  <p>Finally, the logcat filtered by BOOT_COMPLETED:
  <strong>UPDATE : Removed the logcat as it was not necessary</strong>
  (Also I have found the solution which I will have posted down shortly).</p>
  
  <ol>
  <li>logcat filtered for "boot_broadcast_poc" is blank.</li>
  <li>logcat filtered for "bootbroadcastpoc" is blank.</li>
  <li>I definitely don't see the service started as I don't see any Toast on the screen on boot.</li>
  </ol>