Android:将structuredName信息传递给ACTION_INSERT_OR_EDIT不起作用

时间:2012-09-03 01:24:36

标签: android android-intent

我尝试将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);

0 个答案:

没有答案