android - How to make a phone call (to call a given person) if we know the contact's _ID -
android - How to make a phone call (to call a given person) if we know the contact's _ID -
my problem store contacts/persons' _id in database , want initiate phone phone call in order phone call stored contact when user presses button.
i retrieve _id cursor , store database
string cont_id = cursor.getint(cursor.getcolumnindex(contactscontract.contacts._id)); ...
later on, when user presses button call
intent intent = new intent(intent.action_dial, uri.parse("content://contacts/people/" + cont_id)); startactivity(intent);
now problem dialer displayed "empty", not display desired person.
so, seems not fill in person. android development guide says @ intent description:
action_dial content://contacts/people/1 -- display phone dialer person filled in.
how else should fill in desired person? hint?
uri.parse("content://contacts/people/" + cont_id)
here expecting content://contacts/people/ + cont_id
should give phone number not happen bcoz need query content provider
.
note: please refer link fetch contacts:
fetch contacts in android application
android
Comments
Post a Comment