I would like to reuse the native Contact Picker of a User’s device by doing the following:
public void doLaunchContactPicker(View view) {
Intent contactPickerIntent = new Intent(Intent.ACTION_PICK,
Contacts.CONTENT_URI);
// Made up code that I am sure doesn't exist
contactPickerIntent.putExtra("MyRemote3rdPartyContactList", remoteContacts)
startActivityForResult(contactPickerIntent, CONTACT_PICKER_RESULT);
}
However, instead of looking at their contacts that are on the device, I would like to re-configure the Contact UI to point at a Custom Contact Provider that I populate via webservice call in my app.
How would I go about doing this if it is possible?
Technically not possible: the default Contact picker doesn’t have any code to let you feed it a different data source.
If you really want you can pop open the source and poke at it: maybe you can reuse it for your purposes.