简体   繁体   中英

How to add an event to Google Calendar using the API on Android

I am trying to add an event to Google Calendar using the API library ( https://developers.google.com/google-apps/calendar/quickstart/android ) on my Android app, preferably using a method like addEventToGoogle(String title, String description, long unixStart, long unixEnd) However I'm having a really hard time figuring out how to get started with this. Just to be clear, I'm trying to add the events to Google Calendar linked to a Google account, and not just add it to the calendar locally on the device. Can someone help me? I've finished step 4 of the 'tutorial' linked above, but I don't know what to do after that...

The sample you are linking is setting up your app to get the default calendar from the google account and makes the appropriate auth connection. You can see below that (scroll until "Fetch a list of the next 10 events...") it creates a list of events from the server.

Taken from here https://developers.google.com/google-apps/calendar/create-events

event.insert()

And also check out the events api https://developers.google.com/google-apps/calendar/v3/reference/events

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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