14

When i try to use this Intent like so....

Intent i = new Intent(Intent.ACTION_INSERT_OR_EDIT);
i.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
startActivityForResult(i,INSERT_CONTACT);

it loads the contact list then after selecting or creating a contact I do not return back to my app. i have checked the logs and nothing stands out. Is there a new intent action in ICS?

Thanks

Maurycy
  • 3,911
  • 8
  • 36
  • 44
  • nobody is having this problem? – Maurycy Dec 19 '11 at 21:11
  • I have a related problem, made another question about it http://stackoverflow.com/questions/8597080/add-contact-intent-doesnt-return-data-onactivityresult-under-ics – getekha Dec 21 '11 at 23:20
  • 1
    I went with just building my own picker / editor which uses ---- Intent i = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI); ---- and then allows user to edit information within my own custom activity . :( wish it was native – Maurycy Dec 22 '11 at 01:17
  • http://stackoverflow.com/questions/9551821/android-4-0-3-and-finish-activity - similar issue and no reply – user1247617 Mar 25 '12 at 03:41
  • 1
    Partial answer is here: http://stackoverflow.com/questions/8597080/add-contact-intent-doesnt-return-data-onactivityresult-under-ics/9885132#9885132 – OferR Mar 28 '12 at 12:48

1 Answers1

1

Your missing this line:

intent.putExtra(ContactsContract.Intents.Insert.NAME, "Larry Page");

Valid "fields": http://developer.android.com/reference/android/provider/ContactsContract.Intents.Insert.html

Codeversed
  • 9,287
  • 3
  • 43
  • 42