Hi, How to recognize the type of an Email?

The code above doesn't work cause Contacts.ContactMethods.TYPE makes
it bug

Cursor  nameCursor = managedQuery
(Contacts.ContactMethods.CONTENT_EMAIL_URI,
                                new String[]
Contacts.ContactMethods._ID,Contacts.ContactMethods.DATA,
 
Contacts.ContactMethods.TYPE,Contacts.ContactMethods.NAME,
                                                                                
                  },
null, null, null);

So I can't ask for the TYPE of email.

Do we must built a content CONTENT_DIRECTORY for a contact that?

someting like that?   Uri.Builder builder =
Contacts.ContactMethods.CONTENT_EMAIL_URI,.buildUpon();
                                        ContentUris.appendId(builder, nameCursor
                                                        
.getLong(nameColumnIndex));
                                        builder.appendEncodedPath
(Contacts.ContactMethods.CONTENT_DIRECTORY);

                                        Uri phoneNumbersUri = builder.build();
thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to