Вопрос

Background: I am working on an Android Honeycomb (v3.0) application that has a requirement of communicating with the Google Calendar API. I would like to allow my application to access a particular Google account's Calendar data in order to read and create events. I have figured out how to to this through the help of this tutorial and this thread that I have previously posted on stackoverflow.

My requirements: I would like to allow a user to add guests to the events. There are two types of guests: people and (meeting) rooms. I know how to add people as guests to an event, but I have no idea how to add rooms. The way room invitations are supposed to work are as follows:

1) Room is added to the event

2) The event is created

3) Room automatically responds to the invitation by either:

  • Accepting the invitation to the event and displaying it on the room's own calendar

  • Rejecting the invitation

The screenshot below displays how the Google Calendar in-browser UI handles this:

Google Calendar in-browser UI

As you can see, I have added room 109 as a guest. If room 109 is available (which it is, because only available rooms are shown), it will accept the event invitation and add the event to its own calendar.

My problem: I have learned that I can check the free/busy times of a particular calendar by using the Google Calendar API as described here. However, I am not sure whether there is a special procedure for inviting the room to be a location for the event (see the "Where" textbox in the screenshot). Does anyone have some suggestions? Thank you very much for your help!

Это было полезно?

Решение

I have figured out the solution - a room can simply be invited by including its email address into the guest list. The room will then automatically respond to the request. I will have to check whether the room is available before sending it the request to warn the user that the room cannot be reserved if a reservation is already present for that time.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top