Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward notification to other apps #29

Closed
krombel opened this issue Nov 22, 2018 · 23 comments
Closed

Forward notification to other apps #29

krombel opened this issue Nov 22, 2018 · 23 comments
Labels
a:feature New feature or request request-for-comments

Comments

@krombel
Copy link

krombel commented Nov 22, 2018

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

@ialokim
Copy link
Contributor

ialokim commented Nov 23, 2018

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.

@jmattheis
Copy link
Member

I'm open to idea's as well.

I can think of two implementations

  1. Specifying an android activity on the message. This activity then will be started when the notification is clicked
  2. Add a global android broadcast on which other apps can subscribe

@jmattheis jmattheis added a:feature New feature or request request-for-comments labels Nov 23, 2018
@ialokim
Copy link
Contributor

ialokim commented Nov 23, 2018

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?

@jmattheis
Copy link
Member

@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.

@sik0vny
Copy link

sik0vny commented Jan 23, 2019

What about integration with Tasker? That would be megapowerful:)

@Sorunome
Copy link

Heya, has there been any progress on this? I saw the related PR but that didn't receive any activity in three months :/

@jmattheis
Copy link
Member

Nope, sadly no.

@karmanyaahm
Copy link

I found a similar project to this issue https://bubu1.eu/openpush/

@p1gp1g
Copy link
Contributor

p1gp1g commented Dec 28, 2020

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/

@buergi
Copy link

buergi commented Mar 27, 2021

A hacky soution is to simply catch the broadcasted com.github.gotify.service.WebSocketService.NEW_MESSAGE intent, see #44 (comment), 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.

@p1gp1g
Copy link
Contributor

p1gp1g commented Apr 7, 2021

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/

@genofire
Copy link

genofire commented Jul 7, 2021

Is there any plan to merge the unifiedpush branch to master/main ?

@jmattheis
Copy link
Member

From my point of view, UnifiedPush still needs more adoption so that it can be integrated into gotify.

@genofire genofire mentioned this issue Nov 11, 2021
@iMartyn
Copy link

iMartyn commented Jun 21, 2022

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).

@genofire
Copy link

genofire commented Jun 21, 2022

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 gotify/server#420

@iMartyn
Copy link

iMartyn commented Jun 21, 2022

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.

@jmattheis
Copy link
Member

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.

@p1gp1g
Copy link
Contributor

p1gp1g commented Aug 25, 2022

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 😆 . 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

@genofire
Copy link

@jmattheis funny way - using ntfy.sh to get pushnotification for matrix, to use pushbits .....

@PanderMusubi
Copy link
Contributor

Any progress to get support for https://unifiedpush.org/ going again as https://unifiedpush.org/users/distributors/gotify/ lists it as deprecated ?

@jmattheis
Copy link
Member

@PanderMusubi: no, my #29 (comment) still stands. I'll close this issue, as it won't be natively supported.

@gthbusrr
Copy link

gthbusrr commented Oct 1, 2024

@jmattheis I've a proposal the other way around. Do you think it would be possible for Gotify to receive messages via UnifiedPush instead of WebSocket (WSS)? I really appreciate how Gotify renders notifications (compared to ntfy), and I like having predefined applications for an account, rather than needing to "subscribe" to a topic every time I open a new browser. If Gotify could use UnifiedPush as the push distributor (with Gotify acting as the end-user application/client rather than the distributor), that would be fantastic!

@jmattheis
Copy link
Member

Probably possible, but I don't see this is scope for Gotify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature New feature or request request-for-comments
Development

Successfully merging a pull request may close this issue.