views:

188

answers:

1

I am working Calendar API (Java). My specific requirement is I want to add participant to event and at the same time want to specify the participants calendar.

Let us say I have 2 users. User-A and User-B

User-A is creating calendar event and adding User-B as participant User-A's calendar is Cal-A and User-B's calendar is Cal-B.

Now when User-A adds User-B as participant, an event is created in User-B's calendar but is created in his/her static calendar. Is there is a way, how I can specify (using java api) that the invitation/ event created by User-B should go into User-B's Calendar-B?

Note: in the applicaiton program, I have access to both User-A' calendar and User-B's calendar.

Thanks in advance.

+1  A: 

I believe the short answer is no...

Google Calendar, regardless of the API or the language you use, is based on the iCalendar standard, which, from my readings of it, does not have the concept of "Invite a participant and post event invitation on this specific calendar of that participant." If I'm wrong, the quickest way to get your answer and prove me wrong is to find evidence of such a feature in the iCalendar documentation.

I thought I had a workaround, which is "Hey, if you have access to person-B's calendar, why not just create the event on their calendar and add person-A as an attendee?" I did this by sharing one of my sub-calendars of one of my Google Calendar accounts with another. But sure enough, you get the same problem in reverse. Now person-B has the event in the right place, but person-A has it on their default calendar.

So depending on which is your "primary" account, you may want to go that route, but I'm guessing you find that about as appealing as what you're dealing with already.

The only other workaround I found (which was not all that great), is you can access Person-B's calendar and copy the invite to another calendar (the one you want), and then delete it from the main calendar. This will work (I tried it), but obviously it's not as graceful as what you had in mind. If you need specifics on how to copy/delete or how to access a specific non-default calendar, let me know and I'll post some examples.

Anthony