Akonadi Google Resource 0.2

Hi,

so it’s been almost ten days since first version of Akonadi Google Resource and now here comes 0.2. This version introduces Google Calendar Resource, so that you can finally access Google Calendar from comfortable interface of KOrganizer.

UPDATE: Akonadi Google Resource is now in KDE git repository!

Preview of Google Calendar Resource settings dialogAs of now the resource supports read-only access to calendars, so you can just watch your busy schedule, but you still have to update it in GMail. Some basic write support is the main goal for version 0.3.

A good news is, that the resource supports multiple calendars, so you can finally see all your calendars in KOrganizer, not just the default one. You have to add a new resource for each calendar you want to access. In configuration dialog you can then choose, which calendar you want to sync with.

The resource supports, except for the basic properties, multiple attendees, including their roles and types, recurrent events (but without exceptions) and reminders (popup-dialog and email notification).

As I already said, in 0.3 I’d like to introduce read-write access to Google Calendar and add photo-fetching to the Contacts resource.

If you want to give it a try, you can download 0.2 tarball from here, or you get the most recent sources from git:

 git clone git://gitorious.org/akonadi-google/akonadi-google.git

Bye!

UPDATE: Akonadi Google Resource is now in KDE git repository. To fetch it, use:

git clone git://anongit.kde.org/akonadi-google

52 comments on this post.
  1. Dimitar:

    First of all thank you very much for your contribution to Akonadi – I really miss a stable integration with the Google services. I’m wondering, however, what’s the difference between what you do and akonadi-googledata ( http://code.google.com/p/libgcal )? Sorry, but I’m a simple user and I’m a little bit confused :)

  2. progdan:

    Hi,
    akonadi-googledata uses the libgcal library which does not provide for example access to multiple calendars (it supports only the default one) and secondary the project is not much active (last activity about 9 month ago or so).
    This project is not using any external library, I’m using my own implementation of GData API and I hope to provide more features then the other project does. Simply, task of Akonadi Google Resource is to supersede GoogleData resource. :)

  3. Antonis K:

    Hello and thanks for working on this.
    I would love to try this but I can’t build it successfully.
    I’m getting this error:
    : fatal error: /home/data/build/sources/kdepim/kdepim-runtime/resources/kcal/kcalresource.h: No such file or directory
    This path is defined in calendar/eventjob.cpp. Is that intended?

  4. Dimitar:

    Sounds great! :) Thanks, again!

  5. progdan:

    Ooops, that’s definitely not intended :) The line shouldn’t event be there. Remove it please, and then it should build.
    I’ve fixed it in git, thank you.

  6. venky80:

    Hey progdan,
    I remember you from Arch kde snapshot repo maintainer, thanks for this google resource. Do you intend to provide google contacts in akonadi too? Would there be a way to merge contacts between google and say yahoo?

  7. TheBlackCat:

    What is the advantage of the calendar support here over the built-in caldav support?

  8. Antonis K:

    Sorry for being a bad person but my build fails again :) Here is my build log so you can have a look if you would like. http://pastebin.com/FJXBkKMi

  9. progdan:

    This project already features resource for read-write access to Google Contacts. Now I’m actually realizing, that “Akonadi Google Resource” is not a good name for project that provides two resources :)
    I’m not sure how do you mean “merging”, but if you mean displaying contacts from both services, then you just need to add Google Contacts and some resource to access Yahoo and then you can move contacts from one address book to another (supposing there’s a resource providing write-access to Yahoo).

  10. progdan:

    I just tried the CalDAV now quickly and for what I can tell, this project has simpler configuration :) But seriously, I don’t see much difference. Just that this project provides native support for Google GData API, which may allow it to provide some extended features that are not possible via CalDAV – but really don’t take me for word here, I don’t know full capabilities of CalDAV nor Akonadi.
    And if anything else, it will be a great contribution to my programming skills :)

  11. progdan:

    Looks like there are some libraries missing to link against in CMakeLists.
    Could you please tell me what distribution you use? I’m running this on Arch and it works. I will test it further on Fedora tonight and update CMakeLists accordingly.
    Thanks!

  12. Antonis K:

    Arch too (64 bit). I have kdepimlibs 4.6.4 (testing), qjson and libxslt installed.

  13. afiestas:

    Hi
    Would be nice to have a libgdata-qt library so we can reuse it for google reader for example :p

    Looking forward to your work, thanks!

  14. progdan:

    Actually i hope that the implementation of the GData API will somehow grow into something that could be distributed as a standalone library, some sort of byproduct of this project :)

    When Akregator get’s ported to Akonadi I’d like to add a resource for Google Reader actually.

  15. afiestas:

    Just checked, Google Reader doesn’t offer an official api :/

  16. progdan:

    :( That sucks…I originally saw Feed API in list of APIs and I thought it’s an API for the Reader :(

  17. trotil42:

    same problem here…..linux mint 10 kde 32 bit.

  18. chipu:

    I tried to build, on Opensuse 11.4 Tumbleweed, but I got:
    [22:51][chipu@linux-9do8:/data/chipu/programs/source/akonadi-google/build]$ make
    Scanning dependencies of target kgoogle_automoc
    Generating moc_authdialog.cpp
    [ 0%] Built target kgoogle_automoc
    Scanning dependencies of target kgoogle
    [ 3%] Building CXX object libkgoogle/CMakeFiles/kgoogle.dir/kgoogle_automoc.cpp.o
    [ 6%] Building CXX object libkgoogle/CMakeFiles/kgoogle.dir/authdialog.cpp.o
    /data/chipu/programs/source/akonadi-google/libkgoogle/authdialog.cpp:37:26: fatal error: qjson/parser.h: No such file or directory
    compilation terminated.
    make[2]: *** [libkgoogle/CMakeFiles/kgoogle.dir/authdialog.cpp.o] Error 1
    make[1]: *** [libkgoogle/CMakeFiles/kgoogle.dir/all] Error 2
    make: *** [all] Error 2

    Can you help me?
    Thx

  19. chipu:

    Not official, but I found:
    http://code.google.com/p/google-reader-api/
    http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI

  20. progdan:

    Nice catch, thanks :) But there still plenty of work to be done on Akregator first ;)

  21. progdan:

    Hi,
    make sure you have libqjson-devel installed, looks like you’re missing the header files.

  22. Biert:

    Same problem here, Gentoo amd64, KDE 4.6.4, KDE PIM 4.6.0

  23. Antonis K:

    Yep, it since the latest git commit it builds and works just fine :) . I already like it better than akonadi-googledata.
    So, are you planning on submitting this to AUR? If you don’t, I already have a pkgbuild ready and would love to maintain it there. Thanks!

  24. Antonis K:

    Oh nevermind, it’s already there. https://aur.archlinux.org/packages.php?ID=49769 . Keep up the good work!

  25. progdan:

    Could you test latest git sources now? It’s reported to be already working on another computers then mine :)

  26. Radek Novacek:

    I had to change few CMakeLists.txt to make it build on Fedora 15. Patch is here: http://rnovacek.fedorapeople.org/akonadi-google_cmake.patch

  27. trotil42:

    solved :D

  28. Biert:

    Yep builds fine now :) Thanks!

  29. Biert:

    Thanks for your efforts for making this :) I had been using the akonadi-googledata resources but they’ve never worked properly.

    I seem to have a few issues with your resources though.
    1) Contacts resource crashes when opening a contact and closing it again. I don’t think it happens with every contact, maybe it matters how the contact was created (using the resource, or synced from web).
    2) Recurring “whole day” events span 2 days in korganizer.
    3) Contact address is not synced from web to Akonadi.
    4) Newly created contacts from resource are not synced to web.

    Keep up the good work, these resources are indispensible for Android and KDE users :)

  30. Mario Santagiuliana:

    Hi, I have just packaged the akonadi-googledata for Fedora, my review request is here:
    https://bugzilla.redhat.com/show_bug.cgi?id=711058

    I don’t think that akonadi-googledata is dead. I write to his developers and they say will be release a new version nearly.

    Now, I think the best solution for users and developers is to create one projects. It is not really a good idea have two developer on two different project that try to do the same things, isn’t?

    So why don’t merge akonadi google resource and akonadi-googledata?

    I hope we can work all together.

    P.S. excuse my English, I’m Italian…

  31. progdan:

    Thank you, the patch has been commited.

  32. P R Scott:

    Hi ,

    thanks for the google resource! very good job!!

    I downloaded your source today and compiled just fine. I use the akonadi console where I added my google contacts – they work great and integrated well inside my Kontact. So then, I added my google calendar but it will not sync or work. It keeps crashing immediately after allowing authentication. I have rebooted and restarted the akonadi server many times but no good. The bug details: Executable: akonadi_googlecalendar_resource PID: 2286 Signal: Segmentation fault (11)

    Any ideas?

  33. progdan:

    Hard to say, it can segfault on many places. It would really help if you could provide backtrace of the crash ((howto) and possibly output from ~/.xsession_errors (if there’s anything possibly related).

    If you get anything, please send it to my email.

    Thank you for you interest!

  34. progdan:

    Thanks for your remarks. All issues are now fixed in git.

  35. Venky80:

    Hi Progdan,
    I installed the package in Chakra (our devs are awesome packaged it in the repos already) but I am not able to see the resource in akonadi. Is it possible it post some screen shotd how to ?
    Or maybe a youtube video?
    Thanks,
    Venky

  36. progdan:

    Try restarting Akonadi server (akonadictl restart or from Akonadi Configuration), that should help. If it does not, try to logout and log back in.

  37. venky80:

    Hi Progdan,
    Is it read write or just read only at this moment? Can i create contacts/ appointments which will automatically sync with google?

  38. progdan:

    Hi,
    current state of git is:
    - sync/create/edit/delete support for contacts + sync support for contact photos
    - sync support for calendars + basic implementation of creating events

  39. Antonis K:

    Since commit I can’t build it. The error is: *****/akonadi-google-git/src/akonadi-google/calendar/eventjob.cpp: In static member function ‘static KCalCore::Event* EventJob::JSONToKCal(QVariantMap)’:
    *****/akonadi-google-git/src/akonadi-google/calendar/eventjob.cpp:194:65: error: ‘RFC3339Date’ is not a member of ‘KDateTime’
    *****/akonadi-google-git/src/akonadi-google/calendar/eventjob.cpp:195:61: error: ‘RFC3339Date’ is not a member of ‘KDateTime’
    *****/akonadi-google-git/src/akonadi-google/calendar/eventjob.cpp: In static member function ‘static QVariantMap EventJob::KCalToJSON(KCalCore::Event)’:
    *****/akonadi-google-git/src/akonadi-google/calendar/eventjob.cpp:289:48: error: ‘RFC3339Date’ is not a member of ‘KDateTime’
    *****/akonadi-google-git/src/akonadi-google/calendar/eventjob.cpp:292:53: error: ‘RFC3339Date’ is not a member of ‘KDateTime’
    *****/akonadi-google-git/src/akonadi-google/calendar/eventjob.cpp:353:46: error: ‘RFC3339Date’ is not a member of ‘KDateTime’
    *****/akonadi-google-git/src/akonadi-google/calendar/eventjob.cpp:354:42: error: ‘RFC3339Date’ is not a member of ‘KDateTime’
    make[2]: *** [calendar/CMakeFiles/akonadi_googlecalendar_resource.dir/eventjob.cpp.o] Error 1
    make[1]: *** [calendar/CMakeFiles/akonadi_googlecalendar_resource.dir/all] Error 2

  40. Antonis K:

    Oops, I totally messed the html tags. Sorry about that.

  41. progdan:

    Looks like the RFC3339Date was introduced in KDE 4.6 and you’re apparently building against older KDE.
    Try changing the RFC3339Date for ISODate. It will build, but I can’t guarantee it will work as it’s supposed to. In best case, you will lost support for timezones and you will not probably be able to submit new events to Google.

  42. Antonis K:

    I was running kde 4.6.4 . Your comment reminded me of something I have read recently (http://tsdgeos.blogspot.com/2011/06/beware-of-kde-464.html) . So, I downgraded to 4.6.3 and now it builds fine… It seems that 4.6.4 is more of a downgrade than an upgrade for kde :|

  43. progdan:

    I’m developing against about month old git/SVN so I can confirm that in KDE 4.7 the values are present. Probably it’s really just 4.6.4 issue.

  44. Venky80:

    Progdan,
    This is awesome , I am really happy someone is getting this to work the way it should. Regarding the auth token , do i have to authorize after every re-start?
    Google seems to be asking for auth token every restart.
    Thanks,
    Venky

  45. progdan:

    The authentication should be remembered. If it’s not, something is broken :). I will have more time later this week so I’ll take a better look on this and I’ll post update on the project progress too.

  46. mnchild:

    Same problem here, in Kubuntu with KDE 4.6.4

  47. Venky80:

    Spectacular, it will be cool to read about the updates!

  48. Henning Rogge:

    I tried out your code and it looks promising, but when used with KDE 4.7.0 (a kubuntu one) it seems to crash a lot.

    Does this maybe help you ?

    Application: Akonadi Resource (akonadi_googlecalendar_resource), signal: Aborted
    [Current thread is 1 (Thread 0x7f050fc31780 (LWP 8128))]

    Thread 3 (Thread 0x7f04fada4700 (LWP 8130)):
    #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
    #1 0x00007f050b593832 in ?? () from /usr/lib/libQtWebKit.so.4
    #2 0x00007f0508944d8c in start_thread (arg=0x7f04fada4700) at pthread_create.c:304
    #3 0x00007f050938104d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
    #4 0×0000000000000000 in ?? ()

    Thread 2 (Thread 0x7f04f77b1700 (LWP 8132)):
    #0 0x00007f0509373f03 in __poll (fds=, nfds=, timeout=) at ../sysdeps/unix/sysv/linux/poll.c:87
    #1 0x00007f05077f1104 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #2 0x00007f05077f1639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    #3 0x00007f050edeb446 in QEventDispatcherGlib::processEvents (this=0x14e8530, flags=) at kernel/qeventdispatcher_glib.cpp:424
    #4 0x00007f050edbf882 in QEventLoop::processEvents (this=, flags=…) at kernel/qeventloop.cpp:149
    #5 0x00007f050edbfabc in QEventLoop::exec (this=0x7f04f77b0dd0, flags=…) at kernel/qeventloop.cpp:201
    #6 0x00007f050ecd6924 in QThread::exec (this=) at thread/qthread.cpp:492
    #7 0x00007f050eda1c2f in QInotifyFileSystemWatcherEngine::run (this=0x14fdfa0) at io/qfilesystemwatcher_inotify.cpp:248
    #8 0x00007f050ecd9175 in QThreadPrivate::start (arg=0x14fdfa0) at thread/qthread_unix.cpp:320
    #9 0x00007f0508944d8c in start_thread (arg=0x7f04f77b1700) at pthread_create.c:304
    #10 0x00007f050938104d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
    #11 0×0000000000000000 in ?? ()

    Thread 1 (Thread 0x7f050fc31780 (LWP 8128)):
    [KCrash Handler]
    #6 0x00007f05092ced05 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
    #7 0x00007f05092d2ab6 in abort () at abort.c:92
    #8 0x00007f0509b856dd in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #9 0x00007f0509b83926 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #10 0x00007f0509b83953 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #11 0x00007f0509b83aa6 in __cxa_rethrow () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #12 0x00007f050edbfbb2 in QEventLoop::exec (this=0x7fff2c471940, flags=…) at kernel/qeventloop.cpp:214
    #13 0x00007f050edc3ecb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
    #14 0x00007f050f770d36 in Akonadi::ResourceBase::init (r=0x119fc50) at ../../akonadi/resourcebase.cpp:393
    #15 0x000000000040efc6 in init (argc=, argv=) at /usr/include/KDE/Akonadi/../../akonadi/resourcebase.h:188
    #16 main (argc=, argv=) at /home/henning/temp/akonadi-google/calendar/calendarresource.cpp:373

  49. progdan:

    Does not give me much info, the problem seems to be outside my code. Anyway, I’m refactoring the entire code now, I hope to finish it this or next week (I will post a blog about the update), I hope to fix most of the issues. And it will be tested against 4.7.

  50. Henning Rogge:

    Thats sounds great. I was really going crazy when I realized that even after nearly 4 years of KDE4 there was still no working solution to display the google calender events on the desktop.

    If you have something send me a mail, I am looking forward to compile and test it.

  51. debbie:

    Hi,
    I’ve met seg fault too on KDE4.7 Archlinux – The cause is that I’ve disabled the kwallet.
    I’ve turned it on, and now, no issue. Perfectly working. Thanks for the work and regards from France !

  52. progdan:

    Indeed, the resources crash always when KWallet is not ready or running. Thanks for the report.

    Btw, post comments about issues to related blog posts, please. They’re easier to find and track. Thanks!