How to send the calendar location to other apps?

I made a patch for the calendar that runs Qt.openUrlExternally() when the location of an event is clicked, and that can be used to open a navigator (JollaOpas & Maep) by using x-scheme-handlers and command line arguments. But that does not work if the navigator is running already. In that case the x-scheme-handler just activates the navigator, but does not change the address. At least I have not found out how to.

By adding a Nemo QML-plugin DBusAdaptor in the calendar event view and DBusInterface in the navigator I succeeded to update the address in the running navigator. But that worked only if the calendar event view was opened before the navigator. Otherwise the navigator did not find the d-bus service, and missed the later d-bus signals.

I assume, I need a system or session bus that is already running, to send the address to a running navigator. But is there such? org.freedesktop.Geoclue seems to have only numeric content.

Just copying the address to clipboard and leaving the pasting to the user is a solution, but I would like to make it automatic.

3 Likes

I know, I need to add the handling of the x-scheme for Mæp for ages. Can you paste here the form of the string provided by the handler ? This might be a incitation for me to implement it at last.

I can do it like for the setting app and the webcal handler, see /usr/share/applications/webcal-import.desktop from package jolla-settings-accounts-extensions-webcal. The only problem is that this may not be accepted in Harbour, because it requires to install a DBus service in /usr/share/dbus-1/services/, like for instance /usr/share/dbus-1/services/com.jolla.settings.service to ensure that the app is launched if the service is not available yet.