title: Android Security Exception while accessing contacts
body: <p>This is totally weird and I've searched through the forums.</p>
  
  <p>In my main class I have a button onClick will launch the contacts application as shown below. When I click the button, he contacts list is shown but as soon as I tap on a contact a security exception is thrown.</p>
  
  <pre><code>public void selectContacts(View v) {
          Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
          startActivityForResult(intent, PICK_CONTACT);
      }
  
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      switch (requestCode) {
  
          case PICK_CONTACT:
              if (resultCode == Activity.RESULT_OK) {
                  Uri contactData = data.getData();
                  Cursor c = managedQuery(contactData, null, null, null, null);
                  while (c.moveToNext()) {
                      String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));
                      String phoneNumber = getPhoneNumber(id);
                      listOfContacts.add(phoneNumber);
  
                  }
              } else {
                  System.out.println("User didn't pick a contact");
                  finish();
              }
              break;
          }
  
          super.onActivityResult(requestCode, resultCode, data);
      }
  </code></pre>
  
  <p>I've checked the manifest and have tried all combinations of placing the uses-permission tag, within the application, activity etc. But nothing works. Here's my manifest.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="in.company.letsmeet"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk android:minSdkVersion="7" /&gt;
      &lt;uses-permision android:name="android.permission.SEND_SMS" /&gt;
      &lt;uses-permision android:name="android.permission.RECEIVE_SMS" /&gt;
      &lt;uses-permision android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permision android:name="android.permission.READ_CONTACTS" /&gt;
  
      &lt;application
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name" &gt;
          &lt;activity
              android:name=".LetsmeetActivity"
              android:label="@string/app_name" &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 security exception :</p>
  
  <pre><code>05-04 11:26:39.950: E/AndroidRuntime(3861): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://com.android.contacts/contacts/7 }} to activity {in.company.letsmeet/in.company.letsmeet.LetsmeetActivity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.contacts.SemcContactsProvider2 uri content://com.android.contacts/contacts/7 from pid=3861, uid=10093 requires android.permission.READ_CONTACTS
  </code></pre>
  
  <p>Any help will be greatly appreciated. I'm trying this on Android 2.1 Sony experia S10 mini.</p>