I want to emulate the native contact manager behaviour in android, how can I do this? Is there an example or some code? I know how to retrieve the contacts and display them, what I need to be able to do is click on a contact name, which take me to the contact’s details.
The part I’m stuck at is how to perform actions with the contact’s details, i.e call a number or email an email address.
If you can retrieve the contacts, make your own activity which displays all the details. Then you can send an e-mail using e-mail composer like this:
And call using this:
Similarly, you can send SMS too.
Hope this helps!
EDIT:
For
ListViewtry this code to implementonClickListener:Whenever an item from your
ListViewwill be selected, you can access it using thepositionvariable.