We have moved to a new Sailfish OS Forum. Please start new discussions there.

Allow for multiple notification destinations

asked 2013-12-24 17:47:27 +0200

Elleo gravatar image

updated 2013-12-24 20:34:28 +0200

lbt gravatar image

I'm working on porting Rockwatch, an app which allows users to connect their phones with Pebble smart watches, to Sailfish, and one of the key functions of this is to send notifications from the phone to the watch. Currently the notification system on Sailfish implements the org.freedesktop.Notifications system, which is a bit limited in that it assumes there's only ever going to be one application displaying notifications. I've noticed that this has already been extended slightly on Sailfish with the addition of a "GetNotifications" method, but this requires applications to poll for data and to know the names of all applications that might be sending notifications in advance. It'd be much more useful (from my perspective) if the notification server could be extended to emit a signal whenever a new notification is received, so that other applications interested in displaying this information can be made aware of it more efficiently.


edit retag flag offensive close delete



This would definitely be a good feature. I desperately want to get my Pebble working with my new Jolla. If this feature would help Rockwatch app development, I'm all for it!

Janzzu ( 2013-12-24 20:20:32 +0200 )edit

This question/request mirrors a similar one from me in part, though I do go a bit deeper asking for an entire framework. Still, its needed, and I like the points raised in this question.

arjwright ( 2014-01-09 15:37:36 +0200 )edit

What about a pollable notification buffer?

rdmo ( 2015-04-26 14:46:42 +0200 )edit

4 Answers

Sort by » oldest newest most voted

answered 2013-12-24 20:34:32 +0200

lbt gravatar image

We're thinking about it :)
This non-answer just stops vote questions from clogging up the 'Unanswered' section

edit flag offensive delete publish link more


Thanks! :)

Elleo ( 2013-12-24 20:40:12 +0200 )edit

hmm.. the notification has already dbus signal to indicate that notification is closed (org.freedesktop.Notifications.NotificationClosed)

Could there be a signal emitted to tell briefly about new notification, with a string parameter of the source/application name (at least i dont need all the details within notification message, just something to identify reason)

kimmoli ( 2014-02-12 20:35:44 +0200 )edit

answered 2013-12-31 18:55:48 +0200

javispedro gravatar image

This is actually a lipstick (nemomobile) feature request, not entirely Jolla specific. I opened a thread to discuss possible implementations in the ML at https://www.mail-archive.com/mer-general@lists.merproject.org/msg01364.html .

There's already a hackish way to do it that does not involve polling (but it does involve D-Bus sniffing, thus requires installing a D-Bus policy file).

I suspect that the Pebble at some point will enable support for ANCS notifications (if they don't work already, as they're the Apple "standard"), so that will also be useful for Pebble.

edit flag offensive delete publish link more


Great, I'll keep an eye on that :)

Elleo ( 2014-01-01 04:31:00 +0200 )edit

answered 2014-04-07 10:54:51 +0200

rcg gravatar image

updated 2014-04-21 19:28:14 +0200

Well, fwiw, I succeeded in receiving notifications from dbus that are sent via the org.freedesktop.Notifications Notify method.

The hack is really dirty and I think it requires to eavesdrop (Actually, I didn't test without it due to lack of time.) on the session bus. Please note that, right now, eavesdropping on the session bus is possible but I don't know if that may change in the future.

If you want to have a look at the code this is the *.cpp file: https://github.com/ruedigergad/SkippingStones/blob/master/dbusadapter.cpp

Please be aware that this was done very much in a rush and thus the whole code is very crude and hackish. I even re-used a pre-existing class that was intended for pretty much different purposes and thus the classname is also very much misleading.

I wrote a little longer explanation about this in post #15 in the following thread: http://talk.maemo.org/showthread.php?t=92976&page=2 Unfortunately, due to my current lack of time, I couldn't investigate further or come up with a cleaner solution yet.

edit flag offensive delete publish link more



Yeah, that's the sniffing part that I mentioned above. I would like to avoid having to resort to that.

javispedro ( 2014-04-30 18:25:00 +0200 )edit

answered 2014-01-09 09:56:04 +0200

niqt gravatar image

I have jolla and pebble, and i want port my pebble application on jolla, then i need notification!!

edit flag offensive delete publish link more



In what hell this is answer ?? :)

Kaacz ( 2014-01-09 12:56:38 +0200 )edit
Login/Signup to Answer

Question tools



Asked: 2013-12-24 17:47:27 +0200

Seen: 2,352 times

Last updated: Apr 21 '14