Akonadi Google Resource 0.2



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


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

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

52 thoughts on “Akonadi Google Resource 0.2

  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 :)

    • 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. :)

      • Hi, I have just packaged the akonadi-googledata for Fedora, my review request is here:

        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…

  2. 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?

    • 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.

  3. 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?

    • 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).

  4. TheBlackCat

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

    • 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 :)

  5. 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!

    • 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.

  6. 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?

  7. 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!

  8. 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 :)

  9. 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?

    • 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!

  10. 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?

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

  11. 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?

  12. Antonis K
    • 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.

    • 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.

  13. Venky80

    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.

    • 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.

  14. 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 0x0000000000000000 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 0x0000000000000000 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

    • 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.

      • 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.

  15. debbie

    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 !

    • 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!

Comments are closed.