axolotl icon indicating copy to clipboard operation
axolotl copied to clipboard

Push notifications

Open FloVanGH opened this issue 7 years ago • 26 comments

Are there any plans to support push notifications?

FloVanGH avatar Feb 05 '18 19:02 FloVanGH

When openwhispersystem is sending Push notifications to the UBPorts Push Server, then I can support it. Actually it's implemented in the code of the signal app for ubuntu.

nanu-c avatar Feb 06 '18 11:02 nanu-c

Ok thank you.

FloVanGH avatar Feb 06 '18 13:02 FloVanGH

Did you request openwhispersystem to do so?

jonnius avatar Mar 03 '18 06:03 jonnius

Alternatively, would it also be a solution to prevent app suspension in UT Tweak Tools and send a notification if the app is unfocused? I have no idea if this is actually possible though.

timothymctim avatar Mar 05 '18 22:03 timothymctim

This is possible, I even thought that I can add a backgroud worker that could be enabled and keeps the websocket session open like in dekko2. But this costs battery

nanu-c avatar Mar 06 '18 10:03 nanu-c

We are in talks with Openwhisper, however they are very reluctant to just helping us out. I think they in general do not like 3rd party clients, and we really need to convince them that this makes sense. It would be nice to have a user count for Signal on UT. @nanu-c What are the download figures in Openstore currently?

Flohack74 avatar Mar 15 '18 08:03 Flohack74

At least local push notifications are working now, so It's partly solved :)

nanu-c avatar May 10 '18 09:05 nanu-c

The last version was downloaded 364 times

nanu-c avatar May 10 '18 09:05 nanu-c

Thanks for this. Any updates on these issues.

Would it be possible to have a process running (at certain intervals) to check if any new messages have come in (i.e. detects a change somewhere in the app), and then notify locally. This would mean it would be a generic notification for any message on signal, but then maybe it doesn't require the whisper server involved.

cyberpunkedu avatar Sep 29 '18 15:09 cyberpunkedu

Theoretically yes, Dekko 2 is doing the same. We still want to negotiate to patch the Signal server code since its open source. Maybe those changes get accepted, then it would be much easier :)

Flohack74 avatar Sep 29 '18 19:09 Flohack74

Hi. Is there any new progress on this issue?

A new status from Open Whisper whether they permit a "push service" for UT? Or - when this is not possible - whether it is planned to do a "interval checking" like it is done with Dekko 2?

At the moment it is a pity that there is no notification. I sometimes miss messages and only read them some days later. Which is a pity, because otherwise the Signal app on UT works quite fine for me.

RomBuch avatar Jan 13 '19 13:01 RomBuch

Hi. Is there any new progress on this issue?

@Flohack74 wrote over at the UBPorts forum:

Unfortunately one year has passed, and we have still not moved further a bit. OWS does not talk to us any longer it seems, at least they did not reply on what things I sent them. So for us its really questionable what will be the future of Signal on UT. I think that it will not evolve to a fully featured App ever.

Also somebody mentioned a workaround for notifications in Signal there:

Just turn off app suspending for the signal app (using UT Tweak Tool) and you'll get notifications. According to @nanu-c it has no big impact on the battery (at least he doesn't notice a big impact, may vary if you're not already running dekko maybe ;-)). Just try it out!

kallekruse avatar Jan 15 '19 16:01 kallekruse

The workaround that @kallekruse mentioned does work. And it does use more battery.

cyberpunkedu avatar Jan 18 '19 05:01 cyberpunkedu

i enabled it in UT tweak tool to "Prevent app suspension"..but i do not get any notification in the notifications bar at the top of my phone neither any vibration or ringtone. or do i misunderstand anything?

fabrei avatar Jan 18 '19 11:01 fabrei

@fabrei This is how I set it up:

  1. Enable notifications in Signal for each user: Go to the chat, press menu, press the "bell" icon
  2. Keep Signal running in the background (leave window open)
  3. Prevent app suspension in UT tweak

cyberpunkedu avatar Jan 18 '19 14:01 cyberpunkedu

@userj thanks! step 1 did it! i didn't know that the notifications are disabled by default.

fabrei avatar Jan 18 '19 16:01 fabrei

Maybe just a modification of the workaround given above and not knowing anything about it. ;-) While signal is open/when signal is started it does receive notifications. So would there be a workaround to have a background job (cron?) that regularly (user setting) opens signal without UI and checks for messages. If messages are available give a notification. This obviously only makes sense if that is better than having signal open all the time...

Danfro avatar Jan 26 '19 11:01 Danfro

I do not get notifications with the workaround from above when the phone is locked. As soon as I press the power button to turn the screen on notifications come up. I do not need to actually unlock the phone.

Danfro avatar Jan 26 '19 11:01 Danfro

Hello, as you can see above, I have mentioned this thread in Nextcloud Talk github repository. The F-Droid version lacks push notifications as Google FCM is disabled and somebody is developing a code with HTML5 standards to (somehow) replace the Google push notification, you can find his code here : https://gitlab.com/Nextcloud-Push/nextcloud-push-notifier

This is just for sharing, as I said in the other thread, this is really over my competences, but I hope my link will help somebody here. Have a nice day.

prog-amateur2 avatar Apr 02 '21 14:04 prog-amateur2

How should we benefit from a Nextcloud push code? As long as Openwhisper does not implement our push protocol there is nothing we can do.

Flohack74 avatar Apr 02 '21 17:04 Flohack74

Hello, I didn't know that the push problem was related to Openwhisper, I thought it was related to a missing piece of code.
Sorry for suggesting this solution.

prog-amateur2 avatar Apr 02 '21 20:04 prog-amateur2

Has anyone considered implementing a daemon for receiving Firebase Cloud Messaging push notifications without Android? IIUC this would not require the Signal Foundation to change anything on their server. Perhaps it could communicate with applications over dbus. microG has reimplemented the Android API (in Kotlin) so reading that code could be valuable.

Be-ing avatar Apr 11 '21 05:04 Be-ing

The app policy of ubuntu touch, and that's the history where this project comes from is no extra background services because they drain battery. In 2016 we had a working implementation for the signal server to support the ubuntu touch push client https://github.com/signalapp/Signal-Server/pull/62 On Ubuntu touch we have no java support, and i have researched a lot for possible ways to have fcm on go/rust/c++. But you have to imitate an android phone because the fcm for websites/servers is a different channel. Not an easy task. Further, we get the messages at the moment via websocket and if you prevent background suspension it's quite reliable to get all the messages, so it's not worth to invest to much time. What you can do is writing a websocket <-> dbus bridge.

nanu-c avatar Apr 12 '21 07:04 nanu-c

Well, if UBports refuses to consider an alternative solution because of their policy, that's their problem. I'm personally not really interested in UBports. My target platform is Linux distributions running the same stack as Linux desktops and servers have been running for decades.

Not an easy task.

Yeah, I'm sure it would be a lot of work. But I don't see any alternative to making a Signal application for mobile Linux that doesn't drain a ton of battery. This daemon could also be used for reimplementing other Android applications, or perhaps someone could get it to forward push notifications into Anbox.

Be-ing avatar Apr 12 '21 12:04 Be-ing

I am not even sure we can get fcm working at all without complying to Android security standards. Its not an open API that everyone can and should consume. And security standards mean: You have registered your device with a Google account. Its not about policy, we dont hate Google per se, its just about technical feasability and, also important, durability of the solution. We have seen it with WhatsApp, unofficial hacks normally work only for a few months.

Flohack74 avatar Apr 12 '21 12:04 Flohack74

You have registered your device with a Google account.

You do need to register your device for FCM but you don't need to associate it with a Google account. This is how microG's reimplementation works.

Be-ing avatar Apr 12 '21 12:04 Be-ing