insert contact intent, multiple phone / email / etc types?

android allows me to launch an intent to create a new contact. i can put extras into the intent to pre-fill the new contact fields.

Intent intent = new Intent(Intent.ACTION_INSERT);
intent.setType(ContactsContract.Contacts.CONTENT_TYPE);
intent.putExtra(ContactsContract.Intents.Insert.NAME, "Foo Bar");
intent.putExtra(ContactsContract.Intents.Insert.PHONE, "(408) 555-1212");
intent.putExtra(ContactsContract.Intents.Insert.EMAIL, "foo.bar@foobar.com");
startActivityForResult(intent, INSERT_CONTACT_REQUEST);

this works, but i don't see how to handle multiple types of a given field, say phone number. in the intent, i can put extra a phone number, and i can put extra a phone number type, but how do i put extra an additional phone number, with a different (or perhaps even the same) type?

5
задан Jeffrey Blattman 4 January 2011 в 23:30
поделиться