here's the code:
Cursor phoneCursor = mContentResolver.query(Data.CONTENT_URI, new
String[] { Phone.NUMBER, Phone.TYPE, Phone.LABEL }, Data.MIMETYPE
+ "=?" + " AND " + Data.CONTACT_ID +
"=?", new String[]
{ Phone.CONTENT_ITEM_TYPE, String.valueOf(contactId) }, Phone.TYPE
+ " ASC");
normally it works....sometimes it returns an empty cursor which is
totally fine...but when and why does it returns null?
the documentation for the method says:
Returns
A Cursor object, which is positioned before the first entry, or null
ref:
http://developer.android.com/reference/android/content/ContentResolver.html#query(android.net.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lang.String)
but can anyone (any google employee?) explain a bit when and why it's
null?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en