title: SMS Broadcast Receiver not called on Android 6
body: <p>I am trying to capture the SMS received on the phone, but when the phone receives an SMS message the method 'onReceive' is not called. This is my code:</p>
  
  <p><strong>I have the BroadcastReceiver is declared in the 'AndroidManifest.xml' inside the tag 'application':</strong></p>
  
  <pre><code>    &lt;receiver android:name=".util.IncomingSmsReceiver"
          android:exported="true"&gt;
          &lt;intent-filter android:priority="2147483647"&gt;
              &lt;action android:name="android.provider.Telephony.SMS_RECEIVED" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  </code></pre>
  
  <p><strong>This is the IncomingSmsReceiver.java</strong></p>
  
  <pre><code>public class IncomingSmsReceiver extends BroadcastReceiver {
  
      public static final String SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED";
  
      @Override
      public void onReceive(Context context, Intent intent) {
  
          Log.i(TAG, "onReceive executed");
          if (intent.getAction().equals(SMS_RECEIVED)) {
             ...
          }
     }
  }
  </code></pre>
  
  <p>I'm doing the tests on an emulator Google Nexus 5 with Android 6. When I send a sms (fake) in the emulator a notification appears as if it was received really well and I can use it in the default application that brings the emulator. In the logcat of Android Studio does not appear that you have run the method <code>onReceive</code>, or the code written inside.I've tried to change the priority, I've tried using <code>android:enabled="true"</code>, I've tried using <code>registerReceiver</code> and I have not gotten it to work. Does anyone know if I miss something?</p>