Querying Contacts - Sometimes Returns Empty Cursor
I'm trying to query contact's display name: @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { switch (requestCode) { case REQ_CODE_PICK
Solution 1:
I had the same problem on an HTC Incredible S, which makes me think that it might be an HTC phones issue. Anyway, the workaround I ended up using is by retrieving the phone number from the bundle you get back with the data
intent.
finalStringphoneNumber= data.getStringExtra("android.intent.extra.PHONE_NUMBER");
at that point you'll need to do some "reverse logic" to fetch the other data of the contact using PhoneLookup.
Post a Comment for "Querying Contacts - Sometimes Returns Empty Cursor"