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

Feature request: support notifications for f-droid version #257

Open
ghost opened this issue Jul 24, 2018 · 207 comments
Open

Feature request: support notifications for f-droid version #257

ghost opened this issue Jul 24, 2018 · 207 comments
Labels
enhancement New feature or request feature: 🔔 notifications help wanted Extra attention is needed

Comments

@ghost
Copy link

ghost commented Jul 24, 2018

In #58 it was asked to release an version to F-droid , thanks that this happend.
Also there were a huge discussion related to #75, why not to use gcm/fcm.
To summarize, there are users which have concerns to use Google- infrastructer in anyway.

#75 was closed because of the relation to #58.
But now we do have a gcm/fcm free version of talk so I would like to ask to support notifications in this version.
My proposal would be to handle it like every other open source messenger like telegram, signal or riot by keeping it in foreground through a notification.

Thanks in advance! And please keep up the great work.

@gradinaruvasile

This comment has been minimized.

@mario
Copy link
Contributor

mario commented Jul 25, 2018

You do understand this will kill through battery and still be super NOT reliable?

@gradinaruvasile
Copy link

Well it is still worlds better than NO notifications.
Riot (F-Droid version) for example works quite well even with 20 sec checks. The app places a notification icon and it worked for me on Android 6 and 8.1. It was reliable. Now i'm not arguing in some setups this could create issues, but you could take a look how Riot works, it seems quite all right.

@ghost
Copy link
Author

ghost commented Jul 25, 2018

I used riot in the passed and there was not that big battery drain same with signal what I'm still using with for example 21mAh over the last 8 h.

I do know that it is probably not that reliable as gcm/fcm but I think for people who live completely without google it is not the biggest downside.

For example signal gives a warning to the user when it is set up without gcm.

I would be really happy if this could be done because then I could drop signal

Kind regards

@ghost
Copy link
Author

ghost commented Jul 25, 2018

Maybe in addition the question if there is a technical debt which makes an implementation similar to riot, signal, telegram ... impossible?

@gradinaruvasile
Copy link

@nr458h I used the fdroid Riot for a half a year or so and it was very stable. I used even a faster, 20 sec refresh time. The overall battery time improved only marginally after i installed the google play version.

@ghost
Copy link
Author

ghost commented Jul 25, 2018

Maybe one last post to convince you :)

It came to my mind that NC advertises metadata-free communication, so on nextcloud.com/talk it says:

"

Unique protection

Nextcloud Talk goes further than other encrypted communication technologies by keeping metadata private.

While public solutions like Whatsapp or Telegram might encrypt content, they and whomever monitors them still can see who you communicate with and when. With Nextcloud Talk meta data never leaves your server."

With this in mind it could also be an option for the gplay version!

@mario
Copy link
Contributor

mario commented Jul 25, 2018

Not metadata-free, just that it's all on your server. Push is the only way to wake up a device. All content in a push message is encrypted with YOUR OWN DEVICE-SPECIFIC KEY which can be verified.

@ghost
Copy link

ghost commented Jul 27, 2018

@mario I think people realise the downsides of not using GCM, but as gradinaruvasile said, it's still better than not getting notifications at all (or being forced to install MicroG for one app). And other apps have been doing this for quite a while now. Not as the primary or ideal way of delivering notifications, but as an alternative method for app versions delivered outside of the Playstore and for people using custom ROMs without Gapps.

If that's not a priority for you right now, it's totally fine, but people know what they're asking for.

@Gaeldrin
Copy link

Gaeldrin commented Jul 30, 2018

+1, @DudleyDursley summarized it perfectly.

A little repetition for newcomers (original link): the only thing I wish I knew is how WhatsApp does it as it works perfectly and shows no "permanent notification" at all (maybe a hidden notification? I know the icon can be hidden but whole notification?) without any noticeable battery drain. Facebook Messenger works the same at least for calls (I receive calls immediately, messages often slip by without notification..).
I am running LineageOS 14.1 (Android 7.1.2) without any Google licensed apps.

Edit: added original link and also a correction: today even the Messenger works great for message notifications

@mikelupe
Copy link

mikelupe commented Aug 3, 2018

+1, @DudleyDursley summarized it perfectly.

@testbird
Copy link

testbird commented Aug 3, 2018

Only workaround with f-droid I know is using something like the https://delta.chat Email-Messenger, to ask each other to call back.

The situation could be improved of course:

And there are at least two ways to solve the push issue properly:

  • Publish to F-droid #58 (comment) Proof-of-concept to test IMAP-push notifications.
  • Add a https-push "protocol" to the nextcloud server, let it just keep a websocket connection open over time, sending just enough keep-alive messages that NAT routers don't close it as a stalled connection (14 min.). Then nexcloud-apps and other app-servers could use the nextcloud server as a push server, and mobile apps could use a free push client library (e.g. https://gitlab.com/foss-push/planning/wikis/home) that implements a service that uses the required tricks to remain running in the background and would allow the apps to subscribe to nextcloud's push notifications.

@testbird
Copy link

testbird commented Aug 3, 2018

In case you haven't seen it: Battery consumption in deltachat is down to 1% (seems less than what gcm would use if it were installed) and reliability is good since v0.18.2

@bam80
Copy link

bam80 commented Aug 3, 2018

@testbird, it's fine!
Is there any overhead of IMAP-push notifications compared to GCM?

@testbird
Copy link

testbird commented Aug 3, 2018

Don't have any comparison, but the Email-chat spec that deltachat uses sure leaves room for some Email-notify spec that could minimize the overhead.

@Seferi

This comment has been minimized.

@Seferi
Copy link

Seferi commented Aug 12, 2018

I think they should have been upfront about the fdroid version not having notofications, I have been trying to solve the problem since a month... This is how Telegram F-droid seems to solve it:

screenshot_brave_20180812-080638

The app is kinda useless without notification.

@mario
Copy link
Contributor

mario commented Aug 12, 2018

We are VERY upfront about not supporting notifications if you install from F-Droid, in addition to me responding to queries and issues on all possible mediums (twitter, forums, github).

You're free to implement another service which the app will connect to, Nextcloud connector and a patch for the Android app which I'm happy to review and merge if it's good enough. But like the above post says (from Telegram) it's nowhere near anything I'd call good UX.

@Seferi
Copy link

Seferi commented Aug 13, 2018

Thanks for the info mate. Notification support is written on the NCTalk page on F-Droid, I find it misleading...

screenshot_f-droid_20180813-120155

@mario
Copy link
Contributor

mario commented Aug 13, 2018

@Bubu can you pls check why was F-Droid README not updated despite me updating the fastline files? Do we maybe need one stable release before it happens?

@Bubu
Copy link

Bubu commented Aug 13, 2018

Do we maybe need one stable release before it happens?

Yes. Not sure if that's intended behaviour on f-droid side but that's what the code currently does 🤷‍♀️ .

@zeekoe
Copy link

zeekoe commented Aug 22, 2018

Not wanting to add oil to the fire, but adding a +1. My hope was that nextcloud talk could replace telegram for some of my use cases but now that it doesn't have notifications for my setup I think i need to be a little more patient / implement it myself. 🙂
I like the way telegram handles notifications, sad that Google blocked that in 8.

@9662
Copy link

9662 commented Aug 30, 2018

This bothers me.

The Nextcloud ecosystem should not have any Google dependencies whatsoever.

If you are going to depend on features from the Google ecosystem then might as well not bother using Nextcloud at all in the first place.

So really the trichotomy is:

  • notifications without Google, or
  • no notifications at all; or
  • not part of Nextcloud.

@github-k8n
Copy link

I think there's no reason to not implement notifications without GCM.
(except maybe it's "easier" to just give up and use the google libraries)

Conversations (XMPP) does it, K-9 Mail (IMAP) does it.
Yes, I exclude them from the battery optimization, however they use almost no battery, especially when compared to the google bloatware,

Long lived connections with no traffic don't really drain the battery, so it should be simple to just implement a notification based on websocket.

https://en.wikipedia.org/wiki/WebSocket
https://stackoverflow.com/questions/12054412/are-websockets-adapted-to-very-long-lived-connections

@hoellen
Copy link

hoellen commented Sep 16, 2018

This blog post on f-droid could be interesting.

@mikelupe

This comment has been minimized.

@mario
Copy link
Contributor

mario commented Sep 23, 2018

Sorry people, but I've written quite a few times why it's not as easy as you make it out to be.

I have personally invested both my own free time and time of Nextcloud (the company) to make Nc Talk available on F-Droid and so have the guys behind F-Droid (thanks @Bubu, a lot!!!). I would be the first one to implement notifications there if it was technically possible.

Sure, there are workarounds, but not in cases we need - near real-time call notification.

@ghost
Copy link

ghost commented Sep 24, 2018

@mario
I've tested the F-Droid version again and at least the text chat seems to be able to poll the server for new messages. Would it be possible to do that on a semi-regular interval and produce a notification?

@github-k8n
Copy link

@mario, first a big thanks to you and everyone making it possible to have nc talk available in F-Droid.

While I would agree that it is not as easy as just including the google libraries (google likes to make it easy for developers to say "screw it" and to just use their closed-source stuff),
and that it might require more work than is currently available (after all, the focus might not be on those pesky f-droid users),
I have to strongly disagree on you that it would be not technically possible.
As mentioned earlier, all it would require is a long-lived connection (be it websockets or something else) through which the notification can be sent.
BTW, the same channel could also be used to get notified on file changes, not only on mobile but also on the desktop which would be a lot better than the 30 second polling that it currently used.

@accountForIssues
Copy link

@ASerbinski Thank you for your work on getting some kind of notification support. I've been following this thread for a while now and your latest way of just installing the server side app and the apk convinced me to test the solution out.

I've been testing it for a couple of days and so far it has been very positive. Even after wifi disconnects and device restarts, the notifications arrive almost instantly. This is on a Samsung S9+ whose ROMs are known for killing off apps to "save" battery. Battery usage is about 1% per 10 hours or so. I'll keep testing though.

The third party services feature looks very promising as well. I was surprised that it basically functions like a stripped down version of Gotify.

Have you thought about contributing this or opening up a discussion in the main Nextcloud Android app repo since your service isn't just limited to notifications from Talk. Maybe you'll get more beta testers. Maybe the NC Android F-droid version can use your code. But then I guess someone has to maintain the server side app via the official app store. I just wish the F-droid NC apps went the Signal way of having a fallback in case Play Services was absent as I'm sure the concerned users would appreciate having some kind of notification support that might not be instant rather than having none.

@ASerbinski
Copy link
Contributor

Hi @accountForIssues !
Thank you for reporting your success. I am happy that it is working well for you.

For the time being, its probably better to keep the testing group reasonably small. I am open to expanding eventually, as it gets shaken out a bit more.

@ASerbinski
Copy link
Contributor

I've made some more small changes. Because of the potential for proxy configuration issues, I've added a facility for the server to directly issue warnings to the client when undesirable behavior is observed.

So far, I'm recording connections made over a 12 hour period, and if this exceeds 144 (meaning that on average, the client reconnects after less than 5 minutes), a warning notification will be displayed at the client indicating the total number of connections made.

@zeekoe
Copy link

zeekoe commented May 19, 2021

Thanks for your work! I can confirm it works on Raspbian (Debian) Buster with nginx and LineageOS 18.1 (Android 11) On a good ol' LG G5 phone.

@EricThi
Copy link

EricThi commented May 19, 2021

Hello,

Thank for everybody who work on app/features and work to perfect it ;)

On my side, i have test ssepush => work on server, not a problem for that.
After, i can't install on my phone :
OS : /e/ version 0.10 (yes, i need time to upgrade to 0.16/17 for Q build android)
on Samsung galaxy A3 2016

@accountForIssues
Copy link

accountForIssues commented May 19, 2021

@EricThi You should consider creating an issue for your case on the source repo. The author would be able to assist you better over there :)

@ASerbinski
Copy link
Contributor

ASerbinski commented May 19, 2021

@EricThi ; I may be able to address your situation just by lowering the minSdkVersion, but I don't know what "/e/ version 0.10" means in terms of Android API level -- it sounds like something vendor specific. Please look up your API level and let me know at my issue tracker so I can run a test build for you. API level can be found here; https://developer.android.com/studio/releases/platforms

@lotth
Copy link

lotth commented May 19, 2021

I only have been using it for about 10 hours and it accounts for 3% battery loss.

@lotth Please file a bug report on my issue tracker. That is extremely high and inconsistent with expectations. I'd like to look into what is going on there.

Done https://gitlab.com/Nextcloud-Push/nextcloud-push-notifier/-/issues/5

Just to let readers of this thread know that my battery consumption originates in my Synology NAS overwriting the http.conf at every Apache restarts, which makes me unable to set the ProxyTimeout value. @ASerbinski designed a workaround to avoid the periodic reconnections, see https://github.com/nextcloud/talk-android/issues/257#issuecomment-842289887 (thank you Adam). More details at the gitlab link above.

Battery loss was 1% in nearly 2 days !

@penguin86
Copy link

I may be slightly off topic, but I wanted to bring to your attention this app (stub) I found, that displays nextcloud notifications on phones without Google Services. It's only a stub, but it kinda works, despite not using Android-SingleSignOn lib. The biggest problem is it doesn't allow to open the relevant app clicking on the notification. At least, it warns me that there's a new message in Talk, so I don't answer days late as I've done until now...
I hope this can help as a temporary solution.

Meanwhile, I forked NextcloudServices and I'd like to generate an intent to open Talk and the other nextcloud apps on notification tap. Unfortunately, seems that the web url contained in the notification is unable to open the relevant apps, maybe because being every instance self-hosted, there is no way to know when an url is a Nextcloud one. I suspect I should generate an explicit Intent, for every Nextcloud Android app, but I couldn't find a way to translate the url into an intent valid for all apps.

@ASerbinski
Copy link
Contributor

@penguin86
What you found there polls the server and eats battery. It isn't viable.

It often helps if you read backwards a few messages in a thread like this, because you might see something that actually does the job bou are looking for, well.

https://gitlab.com/Nextcloud-Push

@penguin86
Copy link

Thank you @ASerbinski for pointing out. It is a long discussion and I may have missed some messages.
Unfortunately, Nextcloud-Push requires installing a plugin, and that's possible only if the nextcloud instance sysadmin agrees.
Imho the strength of NextcloudServices is that uses the standard notification api available by default. Sure, it eats battery (about 10% a day in my device), but it allows to receive notifications, so I just wanted to leave a message to help others in my same situation until an official solution is available.

@ASerbinski
Copy link
Contributor

Not necessarily. You can can set up your own nextcloud instance anywhere you like, install the plugin there, and use it as a relay.

@andreas1107
Copy link

andreas1107 commented Oct 19, 2023

Not necessarily. You can can set up your own nextcloud instance anywhere you like, install the plugin there, and use it as a relay.

Hi, I'd like to install this on my instance but I can't figure out how.

Is there any instructions for this?

I think it's madness something like Nextcloud require Google services. Defeats the point a bit of using Nextcloud when it comes to Talk.

@ASerbinski
Copy link
Contributor

@andreas1107 ; instructions are in the readme's.

@andreas1107
Copy link

Found it, thanks. In the end I opted for https://github.com/Andrewerr/NextcloudServices - it "just works" and I don't notice particular battery drain with a 10s fetch interval.

Push would be better but I run Nextcloud AIO and I don't want to mess with the settings as it's so automated.

I hope in the future the Talk team will opt to offer notifications without Google services.

@andreas1107
Copy link

I just thought I'd add this article in here as ammo for creating a working notifications solution for Nextcloud Talk that isn't using big Corp spyware solutions: https://www.schneier.com/blog/archives/2023/12/spying-through-push-notifications.html

Security expert Bruce Schneier summarizes what everyone except the naive already knew:

Spying through Push Notifications

When you get a push notification on your Apple or Google phone, those notifications go through Apple and Google servers. Which means that those companies can spy on them—either for their own reasons or in response to government demands.

Using Firebase is most definitely causing all Nextcloud communications to be monitored by Google. Who talks to whom and when, and any meta data associated such as where the NC server is, is very valuable information.

As it's against Nextcloud's mission, I cannot for the life of me understand why an opensource and self-hosted solution isn't opted for. Except the obvious reason, that Nextcloud isn't allowed to do this because some agency already blocks its development.

@p1gp1g
Copy link

p1gp1g commented Dec 20, 2023

Nextcloud encrypt its notifications, so the content doesn't leak to the push provider (usually Google and Apple). However metadata leaks (who uses which app when, an analysis of all the notifications can reveal who talk to who for some apps)

By the way, Neon, a nextcloud client supports UnifiedPush

@andreas1107
Copy link

andreas1107 commented Dec 20, 2023 via email

@strugee
Copy link
Member

strugee commented Dec 20, 2023

If anyone feels this feature is essential, I encourage it to contribute it yourself - remember you're getting this software for free. Or alternately if you are paying Nextcloud for an enterprise subscription, you can let them know through your private support channels that this is important to you. (I don't know how exactly that works; I don't work for Nextcloud GmbH or speak for them.)

@ASerbinski
Copy link
Contributor

@strugee ; plenty of options have been proposed and submitted, but nothing has been accepted.

@maxolasersquad
Copy link

If anyone feels this feature is essential, I encourage it to contribute it yourself - remember you're getting this software for free. Or alternately if you are paying Nextcloud for an enterprise subscription, you can let them know through your private support channels that this is important to you. (I don't know how exactly that works; I don't work for Nextcloud GmbH or speak for them.)

I disagree with this sentiment. Of course, a great benefit of OSS is the ability to contribute, but you do not have to be a contributor to request new features. It is selfish to get upset with developers of OSS for not building the features you want, or building features in the way you want them. However, there is no problem with requesting new features, advocating for a feature request, or suggesting how a feature should be implemented. Healthy OSS projects appreciate this kind of feedback.

@strugee
Copy link
Member

strugee commented Dec 20, 2023

@strugee ; plenty of options have been proposed and submitted, but nothing has been accepted.

I didn't see any PRs linked to this issue in the sidebar which is what I based my comment on. I could be wrong though.

@maxolasersquad agreed, but from my perspective, that's not what I saw going on here - when I read the most recent comments I read them as demanding that this issue be reprioritized which I didn't think was appropriate. But maybe I jumped the gun and didn't give people the benefit of the doubt. If so, I of course apologize.

@Fuseteam
Copy link

Fuseteam commented Aug 7, 2024

it seems there is a pull request for this that is facing soms challenges #2213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature: 🔔 notifications help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests