title: Android error message on install "no content provider found"
body: <p>I'm trying to write a broadcast receiver that gets called for every SMS text message that comes in.   All the published code to do that (that I can find) either has been deprecated or doesn't work.</p>
  
  <p>My code fails at install time, with this message in the log (twice):</p>
  
  <pre><code>06-17 10:15:59.316   396   413 W ActivityManager: No content provider found for permission revoke: file:///data/local/tmp/locator.apk
  06-17 10:15:59.316   396   413 W ActivityManager: No content provider found for permission revoke: file:///data/local/tmp/locator.apk
  </code></pre>
  
  <p>My manifest file looks like this:</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.example"
    android:versionCode="1"
    android:versionName="1.0"&gt;
  &lt;uses-sdk android:minSdkVersion="7" /&gt;
  &lt;uses-permission android:name="android.permission.RECEIVE_SMS"/&gt;
  &lt;uses-permission android:name="android.permission.READ_SMS"/&gt;
  
  &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name"&gt;
      &lt;receiver android:name=".SmsReceiver" &gt; 
          &lt;intent-filter&gt; 
              &lt;action android:name="android.provider.Telephony.SMS_RECEIVED" /&gt; 
          &lt;/intent-filter&gt; 
      &lt;/receiver&gt;  
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Would be glad if anyone could point out what I'm doing wrong.  I'm beginning to suspect that there is no API for reading incoming SMSs.</strong></p>
  
  <p>My source code looks like this:</p>
  
  <pre><code>package com.example;
  import android.content.BroadcastReceiver;
  import android.content.Context;
  import android.content.Intent;
  import android.os.Bundle;
  import android.telephony.gsm.SmsMessage;
  import android.util.Log;
  
  
  public class SmsReceiver extends BroadcastReceiver {
      private static final String SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED";
      private static final String TAG = "locator";
  
      @SuppressWarnings("deprecation")
      @Override
      public void onReceive(Context context, Intent intent) {
          Log.i(TAG, "Intent recieved: " + intent.getAction());
  
          if (intent.getAction() == SMS_RECEIVED) {
              Bundle bundle = intent.getExtras();
              if (bundle != null) {
                  Object[] pdus = (Object[]) bundle.get("pdus");
                  final SmsMessage[] messages = new SmsMessage[pdus.length];
                  for (int i = 0; i &lt; pdus.length; i++) {
                      messages[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
                  }
                  if (messages.length &gt; -1) {
                      Log.i(TAG,
                              "Message recieved: " + messages[0].getMessageBody());
                  }
              }
          }
      }
  }
  </code></pre>