[android-developers] Re: Unable to retrieve the GIVEN_NAME or FAMILY_NAME from database

2010-08-03 Thread Donatello Indino
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));

[android-developers] Re: Unable to retrieve the GIVEN_NAME or FAMILY_NAME from database

2010-07-30 Thread William Ferguson
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

[android-developers] Re: Unable to retrieve the GIVEN_NAME or FAMILY_NAME from database

2010-07-30 Thread j
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