Send notification locally from QT/C++/QML App.
-
Thank you but what I don't understand, is the even being unconfined I cannot get it to work by calling Postal via dbus, even when copying dekko code. It only kind of works with libnotify, but does not make its way into the system tray.
I honestly think the notification system should be way easier for app developers, it's a basic feature.
-
@pparent said in Send notification locally from QT/C++/QML App.:
Thank you but what I don't understand, is the even being unconfined I cannot get it to work by calling Postal via dbus, even when copying dekko code. It only kind of works with libnotify, but does not make its way into the system tray.
I honestly think the notification system should be way easier for app developers, it's a basic feature.
Yes indeed, but popup notification is not the same than indicator messge. the former is based on the freedesktop spec the other is a custom recipe.
I don't know why it would not work by being unconfined, maybe something to do with the appid ?
This CLI method seems to do the jobgdbus call --session --dest com.lomiri.Postal --object-path /com/lomiri/Postal/dekko2_2edekkoproject --method com.lomiri.Postal.Post dekko2.dekkoproject_dekko '"{"message": "foobar", "notification":{"card": {"summary": "yes", "body": "hello", "popup": true, "persist": true}}}"'
I guess that to work, app need some configs via files like in dekko
-
Also Teleport App use Postal too:
https://gitlab.com/ubports/development/apps/teleports/ -
I've quickly looked at your repo, you are missing all the config files needed, even if the example is in QML, it shows the config needed https://docs.ubports.com/en/latest/appdev/guides/pushnotifications.html
-
Thank's
I've added all the required files:
https://github.com/pparent76/whatsweb/commit/4be3c40fa6e692b2c6331dff771f169a829634f2
It does not work any better.....
Really I don't understand how this can get so insanely complex for something as basic as send a notification... It sure will not help app development on the platform.
-
@pparent said in Send notification locally from QT/C++/QML App.:
Thank's
I've added all the required files:
https://github.com/pparent76/whatsweb/commit/4be3c40fa6e692b2c6331dff771f169a829634f2
It does not work any better.....
Really I don't understand how this can get so insanely complex for something as basic as send a notification... It sure will not help app development on the platform.
Maybe you will write a HowTo and find that was not so complex later
The hard part is gathering informations, find the good doc and examples. -
@pparent
Maybe you will need a version bump in your manifest. -
No but I mean even with good documentation I don't see any reason why you need to create/edit 10 files, with many possibilities to make a mistake, to send a notification.
To my mind it should be as simple as something [NOT WORKING EXAMPLES]
import Lomiri.Notifications 1.0 ..... LomiriNotify("title","body");
or
#include <Lomiri/notifications> ..... LomiriNotify("title","body");
Possibly changing the apparmor profile, to add a notification profile, but nothing more.
-
@pparent said in Send notification locally from QT/C++/QML App.:
No but I mean even with good documentation I don't see any reason why you need to create/edit 10 files, with many possibilities to make a mistake, to send a notification.
To my mind it should be as simple as something [NOT WORKING EXAMPLES]
import Lomiri.Notifications 1.0 ..... LomiriNotify("title","body");
or
#include <Lomiri/notifications> ..... LomiriNotify("title","body");
Possibly changing the apparmor profile, to add a notification profile, but nothing more.
Yes, just someone who need to do that ^ ^, but we have also the confinement model which makes it more difficult. Hope you will find something that fit our needs.
Now Qt have made a wrapper for notification, but this doesn't work on our platform yet: https://doc.qt.io/QtApplicationManager/qml-qtapplicationmanager-notification.html#detailsI don't understand well also all that stuff, especially https://gitlab.com/ubports/development/core/lomiri-push-service/-/blob/main/docs/highlevel.txt#L51 , why an app would need to receive a notification? We just want as you said to send a notification
https://gitlab.com/ubports/development/core/lomiri-push-service/-/blob/main/docs/lowlevel.txt -
@lduboeuf said in Send notification locally from QT/C++/QML App.:
why an app would need to receive a notification? We just want as you said to send a notification
I guess this is push notifications, I.e the remote server sends a push notifications to an app that is suspended, to wake it up, and have it execute some code, because a new event happened server-side.
But in practice, as UT is not a widely spread plateform, I guess very few app devellopers have their Own servers, that can send a push notification, like Facebook, Whatsapp, Signal, Instagram, ect... would do. So it seems to me this thing is a good potential tool, that is not so useful in practice for now, at least not as usefull as sending a basic local notification to the notification panel from the app.
-
@lduboeuf said in Send notification locally from QT/C++/QML App.:
@pparent
Maybe you will need a version bump in your manifest.Done: does not have any effect
https://github.com/pparent76/whatsweb/commit/4c959e0ef8fb8b5e8ca6793d7c116531bd5ea497
Anyway I think I will stay with LibNotify notifications, and see if I can trigger independently some vibration (Haptic). I will need to see how to connect it to Desktop notifications of the whatsapp webview. But now I will make a pause, because I'm tired of this.