> When I try and access Google, I am unable to get anywhere ...
How do you try to connect Google? Did you use the Junit tests?
> The
> example source is not very descriptive
The example/ tree is quite old, I should remove it.
Use the Junit tests to see how to connect to a caldav server.
Let me know + Peace,
R.
Ok, you are trying to retrieve an entire collection, not a calendar.
Search for methods returning a List<Calendar> to do what you are trying to do.
The calendar query methods should fit.
I hope to find some time to improve docs and help you. May I ask you to arrange it and provide some detailed documentation?
Peace, Rob
Anyway see:
Google Credential Pattern
http://code.google.com/p/caldav4j/source/browse/trunk/src/test/java/org/osaf/caldav4j/credential/GCaldavCredential.java
See here some failing tests (google has many issues with REPORT: use
OPTIONS to check supported methods)
http://code.google.com/p/caldav4j/source/browse/trunk/src/test/java/org/osaf/caldav4j/google/GCalDAVCalendarCollectionTest.java
Sorry for the little help but my 2nd child was born some days ago, and
I'm quite busy :D
Peace,
R.
> I made more progress ... Now I am stuck to parsing the DSTART time .. Looks
> like I will need to tweak the SimpleDateFormater a little bit.
> DTSTART;TZID=GMT+05:30:20111201T210000
Watch out: that format is well defined in a standard way and shouldn't
accept malformed strings.
http://code.google.com/p/google-caldav-issues/issues/detail?id=57
Google Caldav doesn't care enough for standard... I started tweaking
caldav4j around google for more than one year, but they changed the
behavior various times, so I gave up and decided to do the minimum...
For the TZID stuff, write on the ICAL4J mailing list and propose a
patch or extension to the SimpleDateFormat Class (or extend it
yourself).
Peace,
R.
> I also found a bug in the CalDAV (0.7) code base:
> If for some reason the ETAG header is missing, then we get a
> NullPointerException ..
> CalDAVCollection.java: #742
http://www.google.com/codesearch#lU8bMIL0vRc/trunk/src/main/java/org/osaf/caldav4j/CalDAVCollection.java&q=caldavcollection.java%20package:http://caldav4j%5C.googlecode%5C.com&l=742
Not here, maybe there?
http://www.google.com/codesearch#lU8bMIL0vRc/trunk/src/main/java/org/osaf/caldav4j/CalDAVCollection.java&q=caldavcollection.java%20package:http://caldav4j%5C.googlecode%5C.com&l=746
Can you provide a quick fix? Pls ensure sources are up to HEAD: I
remember to have fixed something like that somewhere in the code.
> ...I am going to write a few test cases of Create / Fetch /
> Update / Delete items.
remember to separate test classes between google and other servers.
You may not be able to query *both* VEVENT and VTODO. A workaround
could be to query for VCALENDAR only.
> There is GenerateQuery and
> then there is CalendarQuery, when would I use each one?
GenerateQuery is an helper to create calendar queries without knowing
the exact structure of the CalendarQuery. GenerateQuery creates a
CalendarQuery.
The CalendarQuery is quite complex. See the caldav specification to
learn howto build a calendar query.
In the GenerateQueryTest file I recreate the queries listed in the
Caldav RFC using GenerateQuery and modifying the result.
http://www.google.com/codesearch#lU8bMIL0vRc/trunk/src/test/java/org/osaf/caldav4j/util/GenerateQueryTest.java
It's the hardest part of caldav (except scheduling, of course).
Shortly:
0. use CalendarQuery if you've time to waste
1. use GenerateQuery to create simple query
2. use GenerateQuery to create a query stub, then modify the
resulting CalendarQuery to easily create complex queries.
3. ALWAYS test+print the query in xml to check if you really build
the desired query.
Peace,
R.
As of now, if something at CaldavResource method doesn't work then:
- there's a problem in caldav4j or
- there's a problem in the server/communication
In the first case, you need to patch caldav4j. In the second you
should fix the problem.
If you modify the library at that level in an external program, you're
modifying the CalDAV implementation behavior. This means that you're
going to break something somewere.
Moreover caldav4j is switching from slide backend to jackrabbit. While
I'm working to preserve all the CaldavCollection functionalities, I
don't guarantee internal methods' behavior in the change.
Anywyay, caldav4j is opensource and open to ideas and contribution: if
you have a valid reason to expose CaldavResource take some time to
explain:
* what you're trying to achieve
* why that class should be public.
I think there are some good reason to do it, but we need to do it in
the right way (ex. embedding a CaldavClient in caldav4j)
PS: take a look at how I use caldav4j (not trunk) in a calendar-sync
project http://funambol-caldav.svn.sourceforge.net/viewvc/funambol-caldav/trunk/src/main/java/it/babel/funambol/CalDAV/engine/CaldavInterface.java?revision=113&view=markup
HTH+Peace,
R.
Hi Harsha,
if I get the point:
- you want to build a caldav sync plug in for android calendar
- you want your sw to be small, including only used classes
- you are willing to patch and rebuild dependencies to achieve this target
The caldav android plug in goes that way: patches and rebuilds some libs, even I do not know if those libs are "stripped".
did you give it a try?
Let me know, I could enable you wiki or svn account for your contribution.
Peace, Rob
--
You received this message because you are subscribed to the Google Groups "caldav4j" group.
To view this discussion on the web visit https://groups.google.com/d/msg/caldav4j/-/Q8GpEnuNj6UJ.
To post to this group, send email to cald...@googlegroups.com.
To unsubscribe from this group, send email to caldav4j+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/caldav4j?hl=en.
if I get the point:
- you want to build a caldav sync plug in for android calendar
- you want your sw to be small, including only used classes
- you are willing to patch and rebuild dependencies to achieve this target
The caldav android plug in goes that way: patches and rebuilds some libs, even I do not know if those libs are "stripped".
did you give it a try?
Let me know, I could enable you wiki or svn account for your contribution.