繁体   English   中英

将我的自定义android日历与Google日历同步

[英]Syncing my custom android calendar with Google Calendar

谷歌搜索时,我有很多如何注册Google Apps的信息。

我做了一个CalendarView。 我有一个列表视图,其中显示了一天中已用或可用的时间。 选择日期和时间后,您将在该时间创建约会。

如何与Google日历同步以显示我的应用当时已进行约会? 我需要向我知道的Google发送数据,但是什么以及如何进行?

尝试使用以下代码使用Intent将事件添加到日历中

Calendar cal = Calendar.getInstance();              
Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
intent.putExtra("beginTime", cal.getTimeInMillis());
intent.putExtra("allDay", true);
intent.putExtra("rrule", "FREQ=YEARLY");
intent.putExtra("endTime", cal.getTimeInMillis()+60*60*1000);
intent.putExtra("title", "A Test Event from android app");
startActivity(intent);

更多详细信息: 通过意图将时间和日期添加到Google日历

祝好运

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM