我可以动态地从事件数据库中获取事件(在代码中)吗?

时间:2022-08-31 06:52:13

I am developing a calendar application. And i have a need to list all the events store in calendar to list in my layout. So that i need to fetch all the events from the calendar database. How can i make this possible?

我正在开发一个日历应用程序。我需要列出日历中的所有事件存储,以便在我的布局中列出。所以我需要从日历数据库中获取所有事件。我怎样才能做到这一点?

1 个解决方案

#1


0  

You can get user's calendars, and then get its events, take a look at android calendar's EventLoader class and related classes.

您可以获取用户的日历,然后获取其事件,查看android日历的EventLoader类和相关类。

The content provider for calendar events is accessible using this URLs:

可以使用以下URL访问日历活动的内容提供商:

for SDK version < 8 : content://calendar/events

对于SDK版本<8:content:// calendar / events

for SDK version >= 8 : content://com.android.calendar/events

对于SDK版本> = 8:content://com.android.calendar/events

#1


0  

You can get user's calendars, and then get its events, take a look at android calendar's EventLoader class and related classes.

您可以获取用户的日历,然后获取其事件,查看android日历的EventLoader类和相关类。

The content provider for calendar events is accessible using this URLs:

可以使用以下URL访问日历活动的内容提供商:

for SDK version < 8 : content://calendar/events

对于SDK版本<8:content:// calendar / events

for SDK version >= 8 : content://com.android.calendar/events

对于SDK版本> = 8:content://com.android.calendar/events