简体   繁体   English

如何从Android中的Google日历获取今天的事件

[英]How to get today's events from Google Calendar in Android

I need to display any events for the current day in my app (associated with the user's Google account) So this means ANY calendar that has been made on their Google account. 我需要在我的应用程序中显示当天的所有事件(与用户的Google帐户相关联),因此这意味着在其Google帐户上已创建的任何日历。

I need to retrieve information about each event such as TITLE, DESC, TIME 我需要检索有关每个事件的信息,例如TITLE,DESC,TIME

I've looked to see what's already out there, but I'm struggling to find ones that specify the date of the events wanted and how to do it without calendarID and eventID as those defeat the purpose of what I want to do. 我一直在寻找已经存在的东西,但是我一直在努力寻找那些指定想要的事件的日期以及如何在没有calendarID和eventID的情况下指定日期的方法,因为这些都违反了我想要做的事情。

Any help is appreciated :) 任何帮助表示赞赏:)

You can use the method Events: list since you cannot get the current events directly. 您可以使用事件:列表方法,因为您无法直接获取当前事件。

You can set the timeMin and timeMax from the start of the current date up to the last hour of the said date. 您可以设置从当前日期开始到所述日期的最后一个小时的timeMintimeMax

You can check this SO post for further info. 您可以查看此SO帖子以获取更多信息。

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

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