5

我试图将 StructuredName 信息传递给 ACTION_INSERT_OR_EDIT,但它不起作用。所有其他领域都很好。

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

ArrayList<ContentValues> data = new ArrayList<ContentValues>();



// add structured name, this does not work, the information do not show
// in the ACTION_INSERT_OR_EDIT activity

ContentValue row = new ContentValues();
row.put(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE);
row.put(StructuredName.FAMILY_NAME, "Test_family_name");
row.put(StructuredName.GIVEN_NAME, "Test_given_name");
data.add(row);`

// add other values...., all of them work

i.putParcelableArrayListExtra(ContactsContract.Intents.Insert.DATA, data);
4

0 回答 0