如何通过email将要同步的日历的mail id传入create事件? 我有一个微调器,显示要同步的帐户列表,如下图所示。现在,像往常一样传递标题、描述以在日历应用程序中创建事件,我使用以下代码。
ContentValues values = new ContentValues();
values.put("calendar_id", 1);
values.put("title", title1);
values.put("allDay", 0);
values.put("dtstart", settime);
values.put("dtend", cal.getTimeInMillis()+60*60*1000);
values.put("description", desc1);
values.put("???????", mail_id);
values.put("???????", participant_mail_id);
values.put("visibility", 0);
values.put("hasAlarm", 1);
event = cr.insert(EVENTS_URI, values);
我应该使用什么来传递 key 以插入电子邮件 ID 和参与者 ID?非常感谢任何帮助。我的屏幕截图如下。
最佳答案
How to pass the mail id of the calendar that to be synchronized
事件通过“calendar_id”链接到日历。要获得“calendar_id”,您应该查询所有用户的日历,然后在结果中搜索您感兴趣的姓名。这是一个应该有帮助的教程:Working with the Android Calendar
或者,您可以创建一个事件,然后让用户选择应该将事件添加到哪个日历:Adding Calendar event through Intent
关于java - 如何将要同步的电子邮件 ID 传递到 android 中的创建事件日历中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7445572/