Skip to content Skip to sidebar Skip to footer

How To Read Google Calendar Events In Android?

I am reading all the android calendar events and it is working fine by using this below code but, I want to fetch all the google calendar events from user mail accounts .How can I

Solution 1:

This post is a little bit old, but here is another easy solution for getting data related to Calendar content provider in Android:

Use this lib: https://github.com/EverythingMe/easy-content-providers

And now, get all calendars:

CalendarProvidercalendarProvider=newCalendarProvider(context);
List<Calendar> calendars = calendarProvider.getCalendars().getList();

Or, get all Events of specific calendar:

List<Event> calendars = calendarProvider.getEvents(calendar.id).getList();

And there is also option to get Reminders, Attendees, Instances.

It works with lists or cursor and there a sample app to see how it looks and works. In fact, there is support for all Android content providers like: Contacts, SMS, Calls, ... Full doc with all options: https://github.com/EverythingMe/easy-content-providers/wiki/Android-providers

Hope it helped :)

Solution 2:

You can read this page. It is written that how you can get the calendar information.

Speaking simply,

  1. get the account logged in the android device. (return object is Account.)
  2. get the calendar list the specific has.
  3. get the events in the range of the particular time. (it is for one calendar.)
  4. repeat 3 for all calendars.

Post a Comment for "How To Read Google Calendar Events In Android?"