Android ACTION_PICK phone number of specific contact -


i know how create intent let contacts app display specific contact:

intent intent = new intent(intent.action_view);   uri uri = uri.withappendedpath(contactscontract.contacts.content_lookup_uri, mmylookupkey); intent.setdata(uri); startactivity(intent); 

i know how create intent ask contacts app let me pick phone number:

intent intent = new intent(intent.action_pick, contactscontract.contacts.content_uri) // explicitly set 'type' 'phone numbers' // intent.settype(contactscontract.commondatakinds.phone.content_type);     startactivityforresult(intent, request_phonenr); 

just have been trying combine these make possible pick phone number specific contact:

intent intent = new intent(intent.action_pick);  uri uri = uri.withappendedpath(contactscontract.contacts.content_lookup_uri, mmylookupkey); intent.setdata(uri); // explicitly set 'type' 'phone numbers' intent.settype(contactscontract.commondatakinds.phone.content_type);     startactivityforresult(intent, request_phonenr); 

does know possible?

intent pickcontactintent = new intent(intent.action_pick,contactscontract.contacts.content_uri);                         pickcontactintent.settype(contactscontract.commondatakinds.phone.content_type); startactivityforresult(pickcontactintent, 0); 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -