How to interact with calendar database
I'm working on a script/program that tries to imports calendar events into the calendar database. Since it is a sqlite-db it seems to be straight forward to add/modify/remove entries in the database as user root.
However if I add an alarm it is not fired by the phone. The alarm is shown in the official Jolla calendar app however closing the calendar app or even restarting the phone does not give me alarms for those events?
Is there some documentation how to register those alarms in the notification system? How does the calendar app cause the alarms to be registered?
Two side questions:
1. Why does the calender app ignore alarms that do not match the suggested times? I.e. a alarm 10 minutes before the event seems to be ignored, if the interval is 0, 5, or 15 minutes it is recognized.
2. There is a file db_changed in the same directory as the calendar db (/home/nemo/.local/share/priviledged/calendar/mkcal/). I see that it is an empty file that is touched when the calendar app makes some changes. What is it good for? Should I touch this file as well from my script?
I wish there were a proper documentation of the system services (e.g. dbus interfaces) and also how to interact with the data managed by the 'official' Jolla apps.
The lack of documentation is really frustrating. And Jolla is not doing much to improve.
rooster13 ( 2014-06-04 07:30:33 +0200 )editI am really interested in this topic, too! But unfortunately i have not found much information and documentation by now. Can you give me a hint where i can find dome information about the database and how to edit it?
Alex-jj ( 2014-09-11 16:45:15 +0200 )editThe recently released buteo-sync-plugins-social source code contains great examples on how to use the calendar database (look into googlecalendarsyncadaptor.cpp)
eber42 ( 2014-09-16 20:38:59 +0200 )edit@eber42 thanks for the hint. The problem I couldn't solve was to register an alarm/notification on the phone. I can set the alarm in the database however the phone does not show the alarm.
In the source file you referred to I couldn't find a hint on how to inform the phone of new alarms.
jollajo ( 2014-09-17 02:17:08 +0200 )editCould it be the same reason, which causes the birthday calendar alarms to keep silence i.e. not giving alarm. Check the birthday alarm posts in TJC for more info, if that would help ad well.
Kari ( 2014-09-17 08:29:39 +0200 )edit