好的,我在这里非常准确地阅读了文档:http: //developer.android.com/guide/topics/providers/calendar-provider.html#update-event并写了这样的内容:
// Here is an example of an intent that sets a new title for a specified event and lets users edit the event in the Calendar.
long eventID = 208;
Uri uri = ContentUris.withAppendedId(Events.CONTENT_URI, eventID);
Intent intent = new Intent(Intent.ACTION_EDIT)
.setData(uri)
.putExtra(Events.TITLE, "My New Title");
startActivity(intent);
对我来说它不起作用 - 它打开了正确的事件,但无法编辑它 - 所有字段都是只读的。只有我可以更改的字段是时区和提醒。其他所有内容都是只读的。难道我做错了什么?
我的 API 级别是 14 (ICS)