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