-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Option to disable permanent notification #82
Comments
I also vote for this feature 📊 |
I also vote for this feature 👍 However, unfortuately, the permanent notification is technically needed: As Delta Chat cannot and will not use Goog'e Clould Messaging (newspeach: Firebase Clound Messaging), we have to use Websockets - but recent Android versions kill all processes after some time; as a result, Delta Chat cannot show up reliable notifications for new messages. The only exception from this are foreground services - and they always come together with a permanent notification. Goog'e says that all this is to save battery ... IMHO it's more to push dev into using non-free-services; in my experience a mobile phone without Goog'e services nearly doubles the battery lifetime. So, if you want to get rid of this notification, ask Goog'e for it. Read on: |
Yeah, I dont have play services on my phone. I get a great battery life. Will look into these hacks |
Looks like android is becoming an headache for devs... |
What about this idea: However, I still think that there should be an option to disable the permanent notification, in case the user uses a custom android. |
Or should use alarm api ? |
Using a second app is far too complicated for such a simple job - eg. the app showing the notification would required to hold the connection then. But some little older Androids have a workaround: Eg. in "Stock Android M" (if I recall correctly) you can filter notifications away - you can hide the permanent notification but allow all other ones. AFAIK, this option is no longer present in Nougat... but maybe there are apps that allow this behaviour. alarm api: do you mean this one? this does not help on this issue. In fact, there is no API for this job. |
I'm on nougat. There's no such option. |
What api does stock dialer & sms apps use to stay alive in background? I think they are restricted. I remember Firefox os app devs using alarm api to enable background sync for their IM apps as a workaround due to lack of such feature. |
As far as I remember, you can filter notifications on Android 7 and above and older android versions do not kill the processes after some time. If this is right you could just add an option to disable the permanent notification. Android 6 and below users would do that because there is no need for it. |
Android Nougat has no longer a filter options (or I haven't found it). And you're right, Android <= Lollipop would not need the permanent notification. |
On my Android 6 device if you go to If the user disables the notification, he could be told that he has to exclude "Delta Chat" from Battery optimisation. If he wants to, he could be redirected directly to the Battery optimisation activity: |
Yes, please add an option to toggle this off. Yes, some ROMs (eg. Huawei or Xiaomi) are too aggresive at killing the apps, but plenty others are not, exclude it in Doze and carry on. You've mentioned Conversations, I've tested it (without GCM!) with Sony 5.1.1/6.0.1 and Samsung 5.0.2/6.0.1 and it always worked great without the need to force the foreground service (and the obligatory permanent notification). BTW, speaking about IMAP, K9 works great without a notification too ;) |
There is no option to this permanent notification. Sorry. Signal has it, Riot has it, and others will get it as well. But, at least, we'll add a little bit of functionality to it: #116 It may be possible under some circumstances to avoid it, however, currently we do not have the resources to check this out - and to test it, over and over, with every new Android version, Samsung may be different from LG etc. I think even if we'd had endless resources, we wont find anyone to handle this. Please complain at Google about this issue. |
Given that the UI is copied from Telegram (or did I understand wrong?) which has no such notification this is sad. Not sure about GCM as a factor, Telegram/Conversations/Signal work without it anyway. When did Signal get one? Don't remember seeing it, but it has been a while. Anyway, Conversations solution is pretty ok since it shifts the burden to the user/ROM, if it works great, if not then blame Google/OEM. (have the notification ON, show a dialogue saying that if toggled off) |
Telegram uses GCM and Signal also uses the permanent notification if GCM is not available. Delta Chat never uses GCM - this is a privacy feature! - and, if in doubt, always needs the permanent notification. Any pull request with smarter approaches are welcome, I would be glad to review them and add them to master. But I fear there is simply no easy solution. |
NB: The UI was initially based upon telegram (noy the best choice as we know today, however, there is only few originally code left), but this is no simple UI issue. It's the background service for which Google decides to display the permanent notification. No permanent notification=no repliable background service. |
Hello r10s, what do you think of setting DeltaChat as an accessibility service to get rid of this permanent notification ? |
No, that the worse solution: https://blog.g3rt.nl/android-lollipop-encryption-user-interface-flaw.html |
I don't know. How can we achieve this? What would be the effect? |
Wow thank you for the link licaon-kter. Nevermind r10s, this would be a major security issue. For details my initial mind, Accessibility service is protect from system kill and restart when stopped, but a "bug" reset encryption password when this type of service is enable (by the user) ... |
Okay, one more thing we know not to work. This is also an approach :) Have a nice day, |
The problem solved with one of or combination of listed methods, but current state of Delta chat is unusable for most people, do you want to have casual users there, not only crazy techno nerds? :) |
What exactly makes you call it unusable? |
@X-Ryl669 |
I didn't understand the whole point of hiding from Google on the Google phone. If me (and most of users) buy some device from Google or Apple then we are trust device vendor and want to use their services. Why deltachat force us to do these crazy things of hiding from Google? It can be configurable and me and only me should decide how I want to keep my "privacy", not the some nerdy app. |
Thank you for your post. I do not think, Delta Chat forces users to do crazy things to hide from Google. It's just that plain IMAP does not work well with GCM, see #82 (comment) , and Google does no longer really offer a proper solution for this issue. To fix this, this may required crazy things. Moreover, Delta Chat just does not want to rely and use Google Services to be compatible with phones not using Google (yes, they exist, maybe not many, but maybe a growing number if more apps stop relying completely on Google :). |
No, plain IMAP does not work well on mobile devices with limited battery/connectivity, it was designed to work on always-connected and always-on-power machines. GCM is the solution for keeping one background network connection for many applications on the device.
You are blaming top 5 companies in the world for not allowing user to have options, and doing it the same way ;)
That is what I described about self-hosted server alternative. Growing number of apps will require that alternative to share single network connection or this attempt to "fight Google" will fail. |
You can use signal or telegram then. Signal and Telegram both decided to use GCM when it's available. However, if you think it's a good idea that Google knows everything you're saying, it's not my case. Currently, I do recognize the amount (herculean) effort spent by Google to build a viable mobile internet device, but I still dislike the strings attached to that. I don't want Google to monitor my life and my connections. So, yes, I would like to have a solution that not using Google as MITM. Please forgive the bad analogy, but if I buy a car from Toyota, I don't expect Toyota to know everywhere I go with it, or what I store in the trunk. Why would I accept this from my phone manufacturer ? What would you say if, everytime you had to go somewhere with your car, you had to call Toyota to get permission to do it (even if Toyota always grants you the permission) ? To answer your last comment, think of a message like "Got accident. I'm locked in my car and it's burning". Do you really think 15mn latency is good enough in that case ? The issue is not about the merging idea for "waking up a device". It's a good move. The bad move is to lock everything in a proprietary and closed system. Honestly, how hard would it be to let user set up the server to query for merged notifications ? A URL in a setting page that's all that's required, since the notification protocol is already documented. By the way, IMAP's IDLE is proved to be optimal for mobile's device battery saving compared to GCM. |
You can disable GCM in settings when there will be such setting :)
How many users require minimal latency? 1 or 0.5%? Why they move app to background then? Google does not close foreground network connections. |
Bah, no I disagree. I think the issue with latency is not about how many users, but how often you need low latency. You don't care to receive a "Ok, thanks" message 5mn later (or even one hour later), but in case some message is urgent, you want it now, not one hour later. |
The same for now, Delta chat should have warning "We are draining your battery with our home-made GCM alternative service" and users will not use it. It can be more user-friendly and provide options and description of advatanges and disadvantages of each, but the main problem for now is absence of any option. |
That's true. If it was possible to use GCM then having the choice in user's hand would be good. Now, taking the above into account and accepting that GCM is not (will not be?) in this project, how to have:
is the current goal of this discussion/issue. And for now, there is no better solution than GCM (except for point 5). If point 5 is not that important to you, there are other solution to this (look at Signal/Telegram/Conversation/Whatsapp). In this project, I think point 5 is one of the main selling pitch. The question of this issue, as I understand it, is about having point 2 done right even if point 4 is not optimal. |
Android build system provide so called "product flavors" which allowing to build single app with different dependencies. For example, https://conversations.im/ - have "playstore" and "free" flavors, and free flavor living in F-Droid, so it is not an issue. |
I agree. Who can implement this? :) However, #269 suggests an option to decide between poll or push. |
With newer versions of android these notifications can now be hidden, unfortunately this hides all deltachat notifications. I think that putting these in a separate notification channel would allow blocking that category of notifications while still receiving chat notifications. Has anyone looked into this? |
@kevincox i also saw some older ones, where you could disable this type explicitly, was in cyanogen, i do not remember which version. apart from that: afaik no one has played with "notification channels" yet. i reopen this issue so that it gets more visible; though its #269 will also offer a partly solution. |
See nextcloud/talk-android#58 (comment), hiding seems only to work in newest android version, or by separating the permanent notification into a push client package: https://gitlab.com/foss-push/planning/ |
Sorry, looks like there are postings trying to inject FUD. I see DC on devices running in idle for days without noticeable battery drain. If battery drain is observed, the problem is much more likely to be due to some remaining timing, reconnect, network change, or imap scanning issue. An "instant messenger" with background notification delays of 15 minutes (anything beyond a minute actually) would seem more like a joke. (As if you could talk yourself out of the competition.) |
Did you try to leave your home wifi station?
You are competing with Google, right? |
So you observed something, but posted about something else? What could be the cause for increased battery usage according to your problem analysis? |
@testbird constant network changes causes increased battery usage. To minimize battery impact I have Google services which provides single network connection for all background activities, thousands of well-paid engineers are working on its optimization. Thousands of "instant messengers" are working great over Google services. Now you say "Google services are evil, we will keep another background connection". Yes, you can do it on the device without Google services, what about casual users? |
And what about users who care about privacy and therefore do not use proprietairy google services? Let's be honest: "casual users" use whatsapp. Sorry, this should not sound offensive, but this is an important topic for a decentralized messenger with privacy focus, since google services are the exact opposite and depending on it woupd at leaste for me be a no-go. |
Yep, it's just that working for Apple Push Notifications and Google Cloud Messaging modules in open source apps may produce some monopoly aversion, and lead to detect the wrong causality and to working on alternatives. |
That is what I want at first: be honest and have big red warning in the app "this app in for nerds who doesn't want to use proprietary services". Or provide options for casual users as discussed earlier. |
Some difference lies between agitating, distorted reflexing ... vs. looking for solutions to some (claimed but not confirmed) higher battery usage. |
The permanent notification is disabled by default now, see #269 |
Update build instructions for meson
I would like an option to disable this permanent notification ("Connected to a@b.c; waiting for messages ...") for the following reasons:
Nevertheless, this app is a great idea!
The text was updated successfully, but these errors were encountered: