This code snippet works for me
cursor = contentResolver.query(Data.CONTENT_URI, null, Data.LOOKUP_KEY
+ =' + lookupKey + ', null, null);
cursor.moveToFirst();
int columnIndex =
cursor.getColumnIndexOrThrow(StructuredName.DISPLAY_NAME);
Log.i(TAG, DisplayName: + cursor.getString(columnIndex));
You appear to be using a combination of Android 1.5 and Android 2.0
mechanisms.
Ie passing Android 2.0 constants to an Android 1.5 mechanism.
Android 1.5
Uri uri = Phone.CONTENT_URI;
Phone.CONTACT_ID,
Phone.DISPLAY_NAME,
Phone.NUMBER,
Phone.TYPE, Phone.LABEL,
Android 2.0
Thanks for the reply. I agree the API doc is very ambiguous.
On Jul 30, 12:39 am, William Ferguson william.ferguson...@gmail.com
wrote:
You appear to be using a combination of Android 1.5 and Android 2.0
mechanisms.
Ie passing Android 2.0 constants to an Android 1.5 mechanism.
Android 1.5
3 matches
Mail list logo