![]() |
Tinkering with DBus on Jolla
Hi,
first of all, I'm not an expert using dbus but I wonder, if it is possible to use dbus to show messages on the event-screen of sailfish like on the N9. I started with dbus-monitor and logged for example an incoming email notification: Code:
... Code:
dbus-send --dest=org.freedesktop.Notifications --print-reply /org/freedesktop/Notifications org.freedesktop.Notifications.Notify string:"" uint32:0 string:"" string:"summary" string:"body" The error message is weird, because Notify is a known method Code:
[nemo@localhost ~]$ dbus-send --session --type=method_call --print-reply --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.DBus.Introspectable.Introspect |
Re: Tinkering with DBus on Jolla
You can use the notification framework from Nemo (also has easy-to-use QML bindings).
Using D-Bus directly is of course possible as well, but a bit harder. |
Re: Tinkering with DBus on Jolla
Quote:
You might want to read the following thread: https://bbs.archlinux.org/viewtopic.php?id=114632 As far as I know Sailfish uses the standard "Freedesktop" notification interface, which means it is the same that is used on Gnome, KDE, and other GNU/Linux desktop environments (finally!). This means that any examples designed for those environments should work in your Jolla device, too. In desktop environments the "notify-send" program can be used to send the appropiate D-Bus calls, too. |
Re: Tinkering with DBus on Jolla
Thank you for your answers!
I got a simple script working with python-dbus. After a little research on the web, it seems that dbus-sent does not permit empty containers or nested containers (e.g. arrays of variants), what Notify needs as arguments. Because I wanted this to write with a python script anyway I gave python-dbus a try, so here it is: Code:
#!/usr/bin/python https://dl.dropboxusercontent.com/u/...0108094718.jpg |
Re: Tinkering with DBus on Jolla
Quote:
I made my own dbus server, and tried to test it with dbus-send... adding interface to the server and it works. Thanks for the script, i'll try this from the qt/QML side next. |
Re: Tinkering with DBus on Jolla
Thanks for that. I've just started tinkering with dbus on Jolla, and it's nice to see some simple examples.
|
Re: Tinkering with DBus on Jolla
:)
dbus-monitor can show nice things Code:
signal sender=:1.198 -> dest=(null destination) serial=590 path=/org/freedesktop/Telepathy/Connection/gabble/jabber/gmail_2ecom_1a4623dead_5f0xdabeef; interface=org.freedesktop.Telepathy.Connection.Interface.SimplePresence; member=PresencesChanged Code:
signal sender=:1.433 -> dest=(null destination) serial=12 path=/com/google/code/AccountsSSO/SingleSignOn/AuthSession_0; interface=com.google.code.AccountsSSO.SingleSignOn.AuthSession; member=stateChanged |
Re: Tinkering with DBus on Jolla
Ok, now with working pop up notification and using jolla icons placed in /usr/share/themes/jolla-ambient/meegotouch/icons/
https://dl.dropboxusercontent.com/u/...0108112941.jpg Code:
#!/usr/bin/python |
Re: Tinkering with DBus on Jolla
crap... How i can cast uint32 inside QML ...
|
Re: Tinkering with DBus on Jolla
Does anyone know if there is possibility to add sounds for those notifications? Or should that been added seperately?
I'm testing notifications to tell when Sauna is ready :) |
All times are GMT. The time now is 23:05. |
vBulletin® Version 3.8.8