Push Notifications API Design #1890
Replies: 4 comments 12 replies
-
I haven't got any ideas for API names - because I haven't done any research on the topic. However ... it appears that you haven't either (something that you say explicitly - "I'm not sure if all platform support this customisation") Without even leaving this project, there is an open ticket that contains at some research and design suggestions: #907. That discussion also addresses one of the biggest issues with what you've described here - the name of what you're suggesting. You've called this a "push notification". A push notification is server initiated. The server "pushes" a notification. If Toga had an API to send a push notification, the user wouldn't see anything (unless they were pushing a notification that was addressed to themselves somehow). As with that older ticket, I suspect what you actually mean is a popup notification, sometimes called a toast (because it pops up like cooked toast from a toaster). The first step on any new feature proposal is to do platform research. That's why I pointed you at Dan's blog post and video - the first step was to research the capabilities of the new widget he wanted to implement. We're not going to commit to an API design until we have a reasonable degree of confidence that it can be implemented on every platform that Toga supports. |
Beta Was this translation helpful? Give feedback.
-
NomenclatureResearching on the topic, I found distinction between the different notifications:
This API design focuses on User Facing Non in-app notifications Windows seems to use the nomenclature of "toast" notification. But, gtk differentiates between in-app(toast) notification and desktop notfication. Calling them desktop notification would be good but on mobile platforms, it would not be very logical sounding. Hence, we can call them app notifications would be better. The major components of a desktop notfication seems to be:
All platforms have a notification center to display all the notifications from different apps. On platforms like Apple, Notification Icon is not changeable. Timeout is also not changeable on some of the platforms. App icon and App Name will remain constant and cannot & should not be changed. Urgency of the notification determines whether a sound will be played or should the notification be silently displayed in the notification center. |
Beta Was this translation helpful? Give feedback.
-
friend, I have the same goal, can you give me some form of contact with you so that we can talk about our projects? |
Beta Was this translation helpful? Give feedback.
-
Is there any news about this subject ? It seems stopping at June 2023; was a solution found in the meantime ? |
Beta Was this translation helpful? Give feedback.
-
So, here is my preliminary API for push notification widget:
It is very simple and doesn't give much customization options. This because I am not sure whether all the platforms do support these customization. Like for example, in macos, I have read that it doesn't allow you to change the notification icon. But other platforms do allow it. So the question arises, can we provide these customization options uniformly?
Further, it also doesn't check whether the notification sent was successful or not. There maybe cases where the notification will not be shown like in Do not distrub mode is on, or notifications are disabled. But, in each of these cases these settings are set by the user according to their preferences.
If we allow the app developers to know if the notification was sent successfully or if the app has the permission to sent notifications, then I fear these options would be misused. The situation would turn like the situation of websites and adblockers where the websites refuse to work if the notification permission is not given. What if the apps do something similar?
Notifications should act as supplementary to an app. I mean they should not solely depend on the notification to display progress or related things.
Anyways, can you give names of the API that you would want to be implemented?
Beta Was this translation helpful? Give feedback.
All reactions