android
android copied to clipboard
Forward notification to other apps
It would be nice if this app can be used as forwarder for notifications to use gotify instead of FCM for notification handling.
An alternative/intermediate solution might be that a tap on the notification opens my app
I also think this would be a great enhancement for gotify, if it could be used as an alternative to the proprietary Google FCM.
For this, it would be necessary to perform some changes and additions to the gotify API and client, to distinguish between notifications that would be shown directly by gotify and some sort of 'trigger' notification which would be forwarded to a third-party app. All of this logic on how an app could register it's usage of gotify and the notification forwarding would have to be thought on.
Are there any plans or comments if and how this could be implemented? I would be interested in contributing ideas and code in some of my free time if there are others interested as well.
I'm open to idea's as well.
I can think of two implementations
- Specifying an android activity on the message. This activity then will be started when the notification is clicked
- Add a global android broadcast on which other apps can subscribe
What about using Android Services as FCM does? Inside the user's app you would have to declare a service using a specific intent-filter with a class similar to FirebaseMessagingService
that could be called when recieving a notification. Or is this not possible due to Android restrictions?
@ialokim sorry for answering that late, I've must've overlooked this message :\
I dunno exactly how the FirebaseMessagingService works but I'm guessing that its with broadcasts. The Gotify android app should be able to send broadcasts like this.
What about integration with Tasker? That would be megapowerful:)
Heya, has there been any progress on this? I saw the related PR but that didn't receive any activity in three months :/
Nope, sadly no.
I found a similar project to this issue https://bubu1.eu/openpush/
There is a new branch: unifiedpush that allows gotify to forward notifications : [edit] All the needed informations are here : https://unifiedpush.org/users/distributors/gotify/
A hacky soution is to simply catch the broadcasted com.github.gotify.service.WebSocketService.NEW_MESSAGE
intent, see https://github.com/gotify/android/issues/44#issuecomment-808758340, to catch the notification from any other app.
To hide the notification the easiest solution is to diable the notifications for whole priority level in Android's notification settings.
However, I'd prefer a proper solution which allows to push silent messages, which are also not shown in the Gotify app, as well.
However, I'd prefer a proper solution which allows to push silent messages, which are also not shown in the Gotify app, as well.
These apps are already able to receive notifications with gotify (silently) : https://unifiedpush.org/users/apps/
Is there any plan to merge the unifiedpush branch to master/main ?
From my point of view, UnifiedPush still needs more adoption so that it can be integrated into gotify.
Right now there is a broken version of UnifiedPush in a fork that has little impetus to be fixed and upgraded to a working version and I am being advised to switch provider because it and I quote "(probably) won't be updated". I like gotify, and I have been running it for a LONG time now, I don't want to switch provider because then I have to rework all my integrations for my other stuff. Is your PoV still the same one year down the line (note: Tusky beta is using UP and cannot use gotify-up).
Do you have installed the common-proxy infront of your gotify?
By the way Element has also merged UnifiedPush (and FluffyChat and SchildChat another Matrix client), too.
ntfy.sh on serverside has implement both /UP and /_matrix pushes, like in common-proxy. (I do not like the quality of code, but it makes his job really good - so i switched last week, because the unwilling of gotify to implement UnifiedPush)
I try to implement in /UP but it was rejected https://github.com/gotify/server/pull/420
Yeah, I have common-proxy in front and it works for example-UP app, but tusky specifically requests binary mode and therefore gotify-up doesn't respond, because that's broken if you have postgres.
Yeah, I more or less have the same opinion now. Mostly, I don't want the effort of maintaining this feature I don't need. To me, it feels like Gotify isn't the right tool for this, or at least I didn't intend it to be used like this. It is possible to use it as distributor, but it doesn't really have the resilience it should have for this, like a proper way to duplicate data / having high availability and first class support of redelivery of messages.
This problem with gotify-UP not working also seems like a maintenance problem, because a new api / feature isn't implemented, and I want to keep gotify as low maintenance as possible for me, I rather do new stuff. This doesn't mean that Gotify is dead, it still gets updates, and I'll do reviews for approved features that improve core functionality. Core functionality in this sense is, simply sending messages via the api and get them on the phone / webapp.
Tbh., I'm unsatisfied with my opinion on this, but I've thought about this a long time and I always come to the same conclusion. I don't want to use my time for features I don't really need or support. I can already have that at my day job (:. Hope this is understandable.
As a side note, there is https://github.com/pushbits/server which has an api compatible with Gotify but uses Matrix for receiving the messages on your phone. This means you get all the benefits from this, like encryption of the messages and stuff. Maybe this is something that would solve your use-case.
I don't want to use my time for features I don't really need or support.
100% understandable, sorry to have bother you so long with this then :laughing: . It can be a good idea to close this issue then :)
PS: It will probably help future users looking at this issue : if you are looking for a decentralized equivalent to FCM. Then check https://unifiedpush.org
@jmattheis funny way - using ntfy.sh to get pushnotification for matrix, to use pushbits .....
Any progress to get support for https://unifiedpush.org/ going again as https://unifiedpush.org/users/distributors/gotify/ lists it as deprecated ?
@PanderMusubi: no, my https://github.com/gotify/android/issues/29#issuecomment-1163522251 still stands. I'll close this issue, as it won't be natively supported.