Wednesday, May 1, 2013

[android help] Android Contact Picking Uri


I have a string content//com.android.contacts/contacts/contacts/2 ie aft the user has selected a particular number.


From this string, how do i get the phone number of this particular contact?


I am new to android environment, so my question might seem a bit primitive.



Cursor c = (Cursor)mAdapter.getItem(a.keyAt(i));
Long id = c.getLong(c.getColumnIndex(ContactsContract.Contacts._ID));
contacts.add(ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, id));

chosenContacts = sb.toString();


chosenContacts is my string and that contains content//com.android.contacts/contacts/contacts/2



.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...