Problems accessing Contacts data
<p>in my app I need to point the user to the contact list, and then receive a selection.
I found <a href="http://mobile.tutsplus.com/tutorials/android/android-essentials-using-the-contact-picker/" rel="nofollow">a very descriptive tutorial</a>, but I keep getting an uncaught exception.</p>

<pre><code> protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (resultCode == RESULT_OK) {
            switch (requestCode) {
            case CONTACT_PICKER_RESULT:
                 Bundle extras = data.getExtras();
    Set&lt;String&gt; keys = extras.keySet(); //NullPointerException on this line

    Iterator&lt;String&gt; iterate = keys.iterator();
    while (iterate.hasNext()) {
        String key = iterate.next();
        Log.v(DEBUG_TAG, key + "[" + extras.get(key) + "]");
    }
    Uri result = data.getData();
    Log.v(DEBUG_TAG, "Got a result: "
        + result.toString());
                break;
            }

        } 
    }
</code></pre>

<p>EDIT:
Here is the Runtime Exception that is caused by the NullPointerException shown before.</p>

<blockquote>
  <p>java.lang.RuntimeException: Failure delivering result
  ResultInfo{who=null, request=1001, result=-1, data=Intent {
  dat=content://com.android.contacts/contacts/lookup/0n293F45435B45/1 }}
  to activity {com.ptylabs.loveyousms/com.myapps.myApp.MyActivity}:
  java.lang.NullPointerException</p>
</blockquote>

<p>And yes, I have the permissions set.</p>

<p>Any ideas whats going on?
Thanks!</p>
