Selecting a specific contact
Posted: 02 Sep 2014 05:18
Hi all,
I'm trying to find a way to access a specific contacts details by inputting the contacts name.
So far I have been able to access the contacts database, with the result that the contacts name that I am searching for appears in a search field at the top of the page and a list of all contacts with that name to be listed below. However, to access that contacts details (phone number, email, etc), I still have to manually click on the contacts name within the list.
The following is the activity that I'm using to query the customer database and which results in a display of the contact name being queried and a list of matching names:
Start Activity
Action: android.intent.action.SEARCH
Data URI: content://com.android.contacts/contacts
Extras: putString("query", "John");
As mentioned, the above successfully locates the contact ("John") but requires me to click on the found contact's name in order to access additional contact details.
Ideally, I just want to
--> input a contact name
and transparently (with no intermediate screens, clicks, etc)
<-- output the contact's phone number, email, etc
Is there any way of modifying the above activity (perhaps with a getString("phone number"), getString("email"), etc ? ) so that I can bypass the need to click on the contact listing first ?
Thanks,
Steve
I'm trying to find a way to access a specific contacts details by inputting the contacts name.
So far I have been able to access the contacts database, with the result that the contacts name that I am searching for appears in a search field at the top of the page and a list of all contacts with that name to be listed below. However, to access that contacts details (phone number, email, etc), I still have to manually click on the contacts name within the list.
The following is the activity that I'm using to query the customer database and which results in a display of the contact name being queried and a list of matching names:
Start Activity
Action: android.intent.action.SEARCH
Data URI: content://com.android.contacts/contacts
Extras: putString("query", "John");
As mentioned, the above successfully locates the contact ("John") but requires me to click on the found contact's name in order to access additional contact details.
Ideally, I just want to
--> input a contact name
and transparently (with no intermediate screens, clicks, etc)
<-- output the contact's phone number, email, etc
Is there any way of modifying the above activity (perhaps with a getString("phone number"), getString("email"), etc ? ) so that I can bypass the need to click on the contact listing first ?
Thanks,
Steve