How to use the little notification popup?
Hey there, how can I use the little notification popup, like it is used in the clock app when you set an alarm? I can't find any info about it :(
We have moved to a new Sailfish OS Forum. Please start new discussions there.
Hey there, how can I use the little notification popup, like it is used in the clock app when you set an alarm? I can't find any info about it :(
You also can create simple python script like in this example and run it as USER: python /path/myscript.py
#!/usr/bin/python
import dbus
bus = dbus.SessionBus()
object = bus.get_object('org.freedesktop.Notifications','/org/freedesktop/Notifications')
interface = dbus.Interface(object,'org.freedesktop.Notifications')
#print(interface.GetCapabilities())
interface.Notify("app_name",
0,
"icon-m-notifications",
"Charging started",
"Charging starter",
dbus.Array(["default", ""]),
dbus.Dictionary({"x-nemo-preview-body": "Charging started",
"category": "x-nemo.battery"},
signature='sv'),
0)
Thanks for your answers. With 'use' i did mean for app development. I'm using nemo-qml-plugin-notifications right now, and it works great. But i am wondering if it is allowed to define my own notification categorys for Lipstick. I want to ship my own category config with my *.rpm and install it into "/usr/share/lipstick/notificationcategories". But i don't know how do name it, is something like "harbour.soundboard.favorite.conf" ok? ('soundboard' is the name of my app, and 'favorite' is the name of the category)
Notice that the nemo-qml-plugin-notifications is not currently allowed in harbour.
https://lists.sailfishos.org/pipermail/devel/2014-June/004635.html
Tanghus ( 2015-07-30 20:31:20 +0200 )editThis thread is public, all members of Together.Jolla.Com can read this page.
Asked: 2015-07-26 13:12:21 +0200
Seen: 837 times
Last updated: Jul 28 '15
nemo-qml-plugin-alarms-qt5 binary packages missing in SDK (how to compile from source?)
Can I import my contacts from N9? [answered]
User wants to see certain part of picture as a Lock Screen background [answered]
We want to create our own TOH [answered]
How user can take backups out of device [released]
What is the best maps/navigation application to use on Jolla? [answered]
How to change Ambiences really fast [answered]
Markdown basics [not relevant]
Hi. What do you mean by 'use'? Do you think of app development? In this case, you might have a look at e.g. harbour-tasklist (github) and search the source code for 'notification' for an example usage...
yurumi ( 2015-07-26 17:52:10 +0200 )editI'm not sure if it's working this way, but you can find this on
AliN ( 2015-07-27 16:30:16 +0200 )edit/usr/share/jolla-clock/pages/MainPage.qml
: It usesnotification.previewBody =
andnotification.publish()
for the alarm expiration notifications.