AlwaysOn icon indicating copy to clipboard operation
AlwaysOn copied to clipboard

[Feature Request] Stop AOD when there are no more notifications in Ambient mode

Open nahoj opened this issue 3 years ago • 4 comments

I use Ambient mode ("Only show after a notification was received") to save battery.

A notification can be dealt with without using the phone. For instance, a notification for a new message in some app will disappear if I read the message on my computer.

Then AOD stays on without any notification to show. Instead, if Ambient mode is enabled, it should switch off if there are no more notifications to show.

nahoj avatar Mar 22 '23 16:03 nahoj

I actually implemented this and tried it on a fork, the diff is as follows: https://gitlab.com/rlees85/alwayson/-/compare/gradleversion...notification_empty?from_project_id=51711947&straight=false

There is a side-effect, that when the AOD goes off the screen does light up for a moment (lock screen) before going off. This is because the screen is technically on whilst AOD is running and you can't tell the screen to turn off unless you are root or something like that....

For me its still better though. I don't have to keep double tapping everytime I deal with a notification elsewhere (desktop app for signal/whatsapp for example).

I also added something to stop AOD coming on for notifications that disappear before AOD even gets to know about them

edit: just to add if the maintainer was interested in a PR i'd need to figure out how to hide it behind a setting probably.

rlees85 avatar Oct 30 '23 17:10 rlees85

@rlees85 repo owner added this to a milestone, so perhaps they might be interested in a PR? I would also very much like a solution to this issue.

JohanAR avatar May 13 '24 13:05 JohanAR

I would very much be interested in a PR. Because of limited time I sadly do not have a lot of time for developing new features myself.

Domi04151309 avatar May 13 '24 13:05 Domi04151309

I will add it to my list of things (add a setting for it and then PR it). I am not really a developer though and I find Android development particularly hard and have never done settings (in a good way) before.

I may even open the PR as [WIP] or something incase anyone else wants to finish it off before I get chance too

rlees85 avatar May 13 '24 19:05 rlees85