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

Awkward Alert behavior when phone is in Do Not Disturb mode #2101

Closed
jamorham opened this issue May 5, 2022 · 33 comments
Closed

Awkward Alert behavior when phone is in Do Not Disturb mode #2101

jamorham opened this issue May 5, 2022 · 33 comments
Assignees

Comments

@jamorham
Copy link
Collaborator

jamorham commented May 5, 2022

Summary:

When the phone is in do-not-disturb mode and an alert is raised, although the override silent mode allows the alert to sound, the actual notification is not visible.

This makes it very awkward to dismiss the alert as it requires opening xDrip and selecting the snooze item from the burger menu. This can be especially painful at 3am and also if the phone also requires key guard unlocking.

How to reproduce:

Go in to the Alerts list with your phone on DND mode, long press to edit an alert which has override silent mode enabled and click to test the alert. Make sure to have alert volume profile set to something like high before this.

What I expect you will see is the the alert noisily sounding but no visible notification to swipe off.

Tested on Android 11.

I'm working on a fix for this but will appreciate testing as behavior could be different on different android versions and also depending on whether the notification channel feature is enabled or not (is off by default)

@jamorham jamorham self-assigned this May 5, 2022
@Navid200
Copy link
Collaborator

Navid200 commented May 5, 2022

I have been using xDrip for several years.
My phone automatically goes to DND after 11:30 PM.
I get alarms when I am sleep and they always show the notification, which I use to snooze.

I don't have the notification channels enabled.

I just did the test you described. I got the notification and swiped it away to quiet the alert.

I have experienced the same thing on multiple phones over the years from Android 5 up to Android 11 now.

@Navid200
Copy link
Collaborator

Navid200 commented May 5, 2022

Would you please in Android go to the following page and see what you have?

Settings −> Apps & notifications −> Notifications −> xDrip+

@Navid200
Copy link
Collaborator

Navid200 commented May 5, 2022

Is it possible that you have accidentally disabled the following?
Screenshot_20220505-173742

@Navid200
Copy link
Collaborator

Navid200 commented May 5, 2022

In my opinion, the highest priority issue with the alerts right now is the following:

Missed reading alert, Forecast low and persistent high alert can be missed when asleep because those particular alerts cannot use the ascending volume profile.

In other words, their volume is not dictated by xDrip. It is controlled by the phone volume, which the user may have lowered for any reason and forgotten about it.

Imagine if you wake up in the morning and find out that you have had no readings (connectivity) for the past 8 hours.

@jamorham
Copy link
Collaborator Author

jamorham commented May 6, 2022

I believe that overriding dnd defaults to off on phone versions that support it and on Android 12 (Tested google pixel) there is no option available to do that at all and the problem exists there also as I have seen on Android 11 - Additionally we want the user to be able to control this which is why there is the "override silent mode" feature on a per alarm basis. This gives the user flexibility to do things like have alerts not embarrass them when they want to be on dnd during the day but to override that at night regardless.

I'm also thinking about adding a button to the notification Snooze Alarm to make it easier to snooze.

Regarding problems with other alerts being missed with low system volume, please raise another issue for it.

@jamorham
Copy link
Collaborator Author

jamorham commented May 6, 2022

I tested this on an Android 9 device and the issue doesn't seem present there.
On MIUI 12.5.5 (Android 11) and 12.0.5 (Android 10) the issue is basically the same but slightly different that the notification doesn't appear in heads-up mode but does still appear on the swipe down notification list.

@Navid200
Copy link
Collaborator

Navid200 commented May 6, 2022

I have this: #1762
I can break it up into many different issues representing the consequences of the main issue I have explained, which is the inconsistency.
Some already exist.

@Navid200
Copy link
Collaborator

Navid200 commented May 6, 2022

Additionally we want the user to be able to control this which is why there is the "override silent mode" feature on a per alarm basis. This gives the user flexibility to do things like have alerts not embarrass them when they want to be on dnd during the day but to override that at night regardless.

Just to be clear, the setting I have shown in the attached image only has to do with notifications, so that the notification is shown on screen so that the user can swipe it to snooze it. It has nothing to do with the sound of the alert.
I can still control hearing or not hearing the alerts on a per alert basis for the alerts that offer a DND setting. Some alerts inherit it from others.

I'm also thinking about adding a button to the notification Snooze Alarm to make it easier to snooze.

How can it be easier than swiping right?
On a second thought, that's a very good idea. Currently, many are unaware they can snooze the alert by swiping the corresponding notification.

@Navid200
Copy link
Collaborator

Navid200 commented May 6, 2022

The ascending volume profile is the best solution for not being embarrassed in public. The alert starts at extremely low (30%) volume. So, no one else can hear it. One can even delay the sound by 3 minutes, during which there will only be vibrations.

Of course, again, not all alerts can use the ascending volume profile currently. Again, if we make all alerts consistent, we will allow all alerts to use it.

I hope the following does not offend anyone. Because that's not my intent:
A diabetic who intends to completely disable alerts when in public needs to acknowledge they have diabetes. They need to take it seriously. They need to realize they can hurt themselves and possibly even others when driving if they don't.

@jamorham
Copy link
Collaborator Author

jamorham commented May 7, 2022

I've added support here: a7bdf97

The alert buttons are controlled by an option. For now I have defaulted this to off to mimic existing behavior. If we think this is good then in future it can be changed to default to on. It depends perhaps on whether users might find it too easy to cancel an alert and whether that could happen accidentally. The button does make it more obvious how to silence the alert though.

I've tested this on Android 8,9,10,11 and 12 but there might still be issues with various manufacturers who interpret how notifications are handled differently so we should be mindful of this change.

I will focus on the single shot alert volumes next, eg low prediction and friends.

@Navid200
Copy link
Collaborator

Navid200 commented May 7, 2022

I'm testing it with the new option enabled.

@Navid200
Copy link
Collaborator

Navid200 commented May 7, 2022

I can see the button is quite large. I wonder how easy it is for someone to swipe it back up to just collapse the notification without snoozing. I will test it the next time I get an alert.
This will help many for easy snoozing who don't know swiping right will snooze also. Thanks for adding it.

@Navid200
Copy link
Collaborator

Navid200 commented May 7, 2022

I got an alert when the screen was locked. After I unlocked the phone, it was on the alert snooze page. This is a new behavior. Is this change intentional? I prefer to be on the main screen when I unlock the phone even if there is an alert.

@Navid200
Copy link
Collaborator

Navid200 commented May 7, 2022

And I cannot hear any alarm when this happens. This is bad. I have disabled the setting. Something is really wrong.

@jamorham
Copy link
Collaborator Author

jamorham commented May 7, 2022

Do you mean the snooze button setting?

@Navid200
Copy link
Collaborator

Navid200 commented May 7, 2022

With the release May 7, 2022, regardless of having the new setting (Alert buttons) enabled or disabled, if an alert triggers when the screen is locked, unlocking the screen brings up xDrip on the snooze page shown below.
Screenshot_20220507-105244

@jamorham
Copy link
Collaborator Author

jamorham commented May 7, 2022

Ok yes, but I was referring to you saying that you didn't get any sound.

@Navid200
Copy link
Collaborator

Navid200 commented May 7, 2022

It happened once when I was getting an alert on BlueJay but not from the phone. When I unlocked, I was on the snooze page and I couldn't hear an alert. At that time, I had the new setting enabled.

Regardless, I don't think the phone should unlock on the snooze page.

@Navid200
Copy link
Collaborator

Navid200 commented May 7, 2022

It's like we are encouraging the user to snooze the alert.
We should be encouraging the user to act on the alert rather than to silence it.
I'm sorry if this sounds angry or confrontational.
This is very unusual to me. You usually don't change the behvior so drastically without giving the users a chance to experience it first.

@jamorham
Copy link
Collaborator Author

jamorham commented May 7, 2022

The type of notification that it is using to bypass DND maybe can trigger the content action to be triggered on unlock, the same destination as if you tap an alert notification from the notification area. Its not really an intended change of behavior just a side effect of how these notifications work. I can alter the destination for that but I'm not sure why it would be so much of a problem.

The user should be snoozing an alert as soon as they are aware of it. There is very little point their phone continuing to make noise once they are aware of the alert. Please explain to me why you think otherwise.

@jamorham
Copy link
Collaborator Author

jamorham commented May 7, 2022

I've been unable to reproduce any problem with the sound not playing so please let me know if you get that again as I would rate it as a serious problem.

@Navid200
Copy link
Collaborator

Navid200 commented May 7, 2022

Imagine a parent goes to their child's room to see why their phone is generating an alert.
The child has gone to the bathroom next door.
The parent unlocks the phone to see what the level is and how bad it is. Instead of seeing the blood glucose level, they see a snooze option with no reading. They now have to tap on the top left button and tap on home page to go to the main screen in order to see the value.

Scenario 2:
A user is woken up by a low alert. They are really low. Instead of seeing their blood glucose, they see a snooze button.
Instead of seeing the reading, dropping the phone and going to the kitchen to eat, they first need to snooze the alert.
What if they don't make it to the kitchen and the partner assumes that everything is fine because the alert has been snoozed?

@jamorham
Copy link
Collaborator Author

jamorham commented May 7, 2022

Okay. I can make it go to the home screen but on mine it shows the glucose value on the lock screen as part of the notification before unlock.

@Navid200
Copy link
Collaborator

Navid200 commented May 7, 2022

Thanks. Please change it back. I don't see my blood glucose on the lock screen. I'm sure I can figure out how to do it if I want to. But, I don't think it is like that for everyone by default. Hence, my request to change it back to unlock to the main screen.
Thanks.

@Navid200
Copy link
Collaborator

Navid200 commented May 7, 2022

The issue of not hearing the alert happened again.
May be it only happens if you use the ascending volume profile.
I let BlueJay vibrate on and on and did not snooze. When the volume reached 100% on the next read cycle, on then, the sound could be heard.

@jamorham
Copy link
Collaborator Author

jamorham commented May 8, 2022

Isn't that how ascending profile would normally work?

@jamorham
Copy link
Collaborator Author

jamorham commented May 8, 2022

May 8th nightly has the change for the lock screen notification to open to the home screen of xDrip instead of the snooze page.

I also made another change which should revert any possible change to when vibrations occurred when Samsung phones were on DND and the alert wasn't set to override DND.

I'm thinking to keep the SNOOZE ALERT button inside the notifications disabled by default as its probably too easy to cancel alerts. For example on mine its possible to press the button even when the phone is locked. I'm not sure what that would do if it were in a pocket. But I will leave the option there for anyone who wants to enable it.

@Navid200
Copy link
Collaborator

Navid200 commented May 8, 2022

One who uses the ascending volume profile, has two options as explained here:
https://navid200.github.io/xDrip/docs/Ascending-volume-profile.html

I choose not to delay the sound. So, my alerts start right away making sound.

I will be testing the new release now. Thanks

@jamorham
Copy link
Collaborator Author

jamorham commented May 9, 2022

I think this issue is resolved now. I plan to close the issue soon. Please advise if seeing any problems with the latest.

@Navid200
Copy link
Collaborator

Navid200 commented May 9, 2022

Unlocking the phone unlocks on the main xDrip page now. Thanks a lot.
I see no issues.

I cannot be sure. But, I had to disable notifications making sound and vibrate again. I could be wrong. But, it's possible installing the latest release may have triggered that.

@Navid200
Copy link
Collaborator

The button is now hidden. One has to tap on the arrow in the notification to expose the button. So, we need to tell users about that. But, if we wanted to do that, why not just tell them that they can just swipe it? That's what I have been doing in my documentation.

If it was possible to make the button smaller so that it wouldn't occupy the entire width of the notification so that the user could easily swipe the notification back up if wanted to, I would make the button visible all the time, and I would also remove the setting so that the button would always be visible for everyone.

@Navid200
Copy link
Collaborator

It seems that it has to do with how many notifications there are on the screen. Now that I have closed all the other notifications, pulling down from the top shows the button automatically.

@Navid200
Copy link
Collaborator

Regarding problems with other alerts being missed with low system volume, please raise another issue for it.

#2122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants