Hi!
Thank You for your answer! I have alredy solved it:
EventEntry.java:
public class EventEntry extends Entry {
@Key("gd:when")
public When when;
@Key("gd:recurrence")
public String recurrence;
@Key("gd:reminder")
public Reminder reminder;
@Key("batch:id")
public String batchId;
}
EventFeed.java:
public class EventFeed extends Feed {
@Key("entry")
public List<EventEntry> events = new ArrayList<EventEntry>();
@Override
public List<EventEntry> getEntries() {
return events;
}
}
In CalendarClient.java I add:
"public EventEntry executeInsertEvent(EventEntry event, CalendarUrl
url) throws IOException {
return (EventEntry) executeInsert(event, url);
}"
And now working whit the following event:
EventEntry event = new EventEntry();
event.title = EventTitleFromInput;
event.recurrence =
"DTSTART;VALUE=DATE:"+separated[0]+""+separated[1]+""+separated[2]+"\r
\n"
+ "DTEND;VALUE=DATE:"+separated[0]+""+separated[1]+""+nextDay+"\r
\n"
+ "RRULE:FREQ=YEARLY;UNTIL=20220101\r\n";
On júl. 13, 17:10, Alain Vongsouvanh <[email protected]> wrote:
> Hello Leslie,
>
> Have you written a class representing a Calendar Event Entry? If this is the
> case, could you share your code with us so we can take a look at what you've
> done and show how to add supported fields to your class.
>
> You also might be interested in getting the raw Calendar Event Entry XML to
> see how the underlying data is represented:
> -http://code.google.com/apis/calendar/data/2.0/developers_guide_protoc...
> -http://code.google.com/apis/gdata/docs/2.0/elements.html#gdEventKind
> -http://code.google.com/apis/gdata/docs/2.0/elements.html#gdRecurrence
>
> Best,
> Alain
>
> On Tue, Jul 12, 2011 at 5:32 AM, Kárpáti László
> <[email protected]>wrote:
>
>
>
>
>
>
>
>
>
> > Hi,
> > I'm started to use the Google Calendar Api and now I'm ok with the
> > authetication, get the calendar list, rename the calendars, and add
> > event with specified time and title to a selected calendar.
> > I'm started to use the model from the calendar-v2-atom-android-
> > sample
> > (http://code.google.com/p/google-api-java-client/source/browse/
> > calendar-v2-atom-android-sample/src/com/google/api/client/sample/?
> > repo=samples#sample%2Fcalendar%2Fandroid%2Fmodel) and i figured out
> > what I have to add to the model for the events because I read this:
> >http://www.google.com/support/forum/p/apps-apis/thread?tid=3b948784a9...
> > But now I have to add a recurrention for my events, and I alredy read
> > this:
> >http://code.google.com/apis/calendar/data/2.0/developers_guide_java.h...,
> > but not really clear what is the content of the "public class
> > Recurrence {}", and where and how should I define the
> > "setRecurrence(Recurrence recurr)()" function.
> > Please help,
> > Leslie.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Google Calendar Data API" group.
> > To post to this group, send email to
> > [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://code.google.com/apis/calendar/community/forum.html
>
> --
> Alain Vongsouvanh
--
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://code.google.com/apis/calendar/community/forum.html