title: Broadcast receiver not receiving
body: <p>I want to make a broadcast and my Receiver should receive the broadcast, but it is not working.<br>
  I have the following code:  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="utilities.dip.com.checkbattlevelstackof"&gt;
  
      &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /&gt;
      &lt;service
          android:name=".YourService"
          android:enabled="true"
          android:exported="false"
          android:label="@string/app_name" &gt;
      &lt;/service&gt;
  
      &lt;!-- Receivers --&gt;
      &lt;receiver
          android:name=".AlarmReceiver"
          android:enabled="true" /&gt;
      &lt;receiver
          android:name=".BootReceiver"
          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;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity android:name=".MainActivity"&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;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>The receiver is: </p>
  
  <pre><code>package utilities.dip.com.checkbattlevelstackof;
  
  import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
  import android.util.Log;
  
  
  
  public class BootReceiver extends BroadcastReceiver {
  
      public static final String TAG = "BootReceiver";
      public static final String ACTION_BOOT = "android.intent.action.BOOT_COMPLETED";
  
      @Override
      public void onReceive(Context context, Intent intent) {
          if (intent.getAction().equalsIgnoreCase(ACTION_BOOT)) {
              // This intent action can only be set by the Android system after a boot
              Log.d(TAG,"Received boot event");
              Intent monitorIntent = new Intent(context, YourService.class);
              monitorIntent.putExtra(YourService.HANDLE_REBOOT, true);
              context.startService(monitorIntent);
          }
          else{
              Log.d(TAG," Action received : " + intent.getAction());
          }
      }
  }
  </code></pre>
  
  <p>When I am making a broadcast I am not getting any log:</p>
  
  <pre><code>platform-tools $ ./adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -c android.intent.category.DEFAULT -n utilities.dip.com.checkbattlevelstackof/utilities.dip.com.checkbattlevelstackof.BootReceiver
  Broadcasting: Intent { act=android.intent.action.BOOT_COMPLETED cat=[android.intent.category.DEFAULT] cmp=utilities.dip.com.checkbattlevelstackof/.BootReceiver }
  Broadcast completed: result=0
  </code></pre>
  
  <p>What is the mistake ?</p>