NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.39k stars 1.14k forks source link

Notification Channel settings missing on new phone #1503

Open dbnsacc opened 3 years ago

dbnsacc commented 3 years ago

I am replacing my older Pixel 2 XL with a Pixel 5 and I am having an issue with not being able to properly configure the glucose alerts notification channel on the new phone. I transferred my settings using the QR code method and have set my glucose alerts up from scratch the same as the old phone but I am unable to set the channel options as I was on the old phone so that the alarms can vibrate and break through Do Not Disturb mode at night reliably.

I have tried toggling various options inside the alerts section to see if I can get this to appear including changing the Alert Volume Profile to no avail.

I've attached screenshots showing the different options I have on the two phones (both are running Android 11). If I press on the text for the 'bgAlertChannel' notifications on the Pixel 5 it simply toggles on or off.

xdrip_GANCP2XL_11112020_1302 xdrip_GANCP5_11112020_1304

tolot27 commented 3 years ago

@dbnsacc I'm a bit lost. Were are the screenshots from? From Android System Settings or xDrip settings? The skin looks completely new to me. Which version of xDrip do you have?

dbnsacc commented 3 years ago

These are inside the system settings where you can control the notification channels for each app. On a Pixel you can access the settings quickly by half/short swiping a fired notification and tapping the cog. The skin is essentially as close to stock Android as you get with a Pixel nowadays.

I suspect that the reason I can't adjust the notification channel on the new phone is that I haven't yet found a way to 'fire' that notification type within xDrip+ on it - it always seems to fire the one in my previous posts screenshot with just the vibration symbol (whereas on the old phone at some point in time I must have managed to fire the alternate type with the music note) which exposed the individual settings allowing me to break through Do Not Disturb mode (notification settings aren't exposed until a notification fires in recent versions of Android).

I'm on the very latest version of xDrip+ available on both phones: a91b660-2020.10.01 and attached a screenshot of my system status and one of my configured notifications as an example of how I have them set. I've tried reconfiguring each of these options and test firing them to no avail. I also have the option to speak an alert enabled under Settings > Speak Readings but disabling this has no effect. My volume profile is currently on ascending also but again changing to medium, for example, does nothing.

Navid200 commented 3 years ago

@dbnsacc The three screenshots in your first post are all screenshots of Android settings, no? What can we do from xDrip to change any of that?

Would you please explain what you expect xDrip to do?

nickb24 commented 3 years ago

The problem being described can be seen here: https://developer.android.com/training/notify-user/channels

I've taken a look a little bit into the xDrip code but haven't figured out why xDrip doesn't register as a proper notification channel with Android.

Navid200 commented 3 years ago

@nickb24 is this issue a duplicate of the following? https://github.com/NightscoutFoundation/xDrip/issues/999

nickb24 commented 3 years ago

@nickb24 is this issue a duplicate of the following?

999

I think it's related but not a duplicate.

tolot27 commented 3 years ago

@nickb24 is this issue a duplicate of the following?

999

I think it's related but not a duplicate.

Please can you elaborate this in more detail?

nickb24 commented 3 years ago

@nickb24 is this issue a duplicate of the following?

999

I think it's related but not a duplicate.

Please can you elaborate this in more detail?

Essentially if you look at the developer documents here: https://developer.android.com/training/notify-user/channels you can see that when a notification group is created the user is supposed to have the ability to click on the group and then get additional settings. You can see that with any other app that I have on my phone (Pixel 2, Android 11).

I think the two issues are related because they both have to do with how xDrip handles and creates notifications using channels.

Navid200 commented 3 years ago

I don't understand what the issue is. I am using notification channels effectively. They let me customize different alarms. If this is an issue, please explain how I can reproduce it. Otherwise, I am inclined to close it.

dbnsacc commented 3 years ago

I don't understand what the issue is. I am using notification channels effectively. They let me customize different alarms. If this is an issue, please explain how I can reproduce it. Otherwise, I am inclined to close it.

As can be seen from the screenshots in the original post, the channel (bgAlertChannel) which would allow the alerts to be customized in order to break through Do Not Disturb on the newer phone does not have the individually fired alerts (Glucose Alerts Settings) displayed in the Notification Settings for xDrip+ in order to do so. Instead they can only be enabled or disabled completely by the displayed toggle.

I'm not sure how to reproduce this as it is an issue I experienced moving from my old to my current phone and persisted despite resetting xDrip+ and setting back up from scratch (as well as when restoring from backup). As far as I am aware, Android has to detect that a certain alert has been 'fired' by a channel before it will display in the System settings and that doesn't seem to be happening for some reason on my Pixel 5 (despite testing the alerts in the settings of xDrip+ and receiving actual alerts since).

Navid200 commented 3 years ago

I can see bgAlertChannel in your screenshot. What is wrong with it?
Can you not tap on it and tweak it as you like? You need to tap on the left, not on the button.

dbnsacc commented 3 years ago

Unfortunately whether I tap on the toggle or the text "All 'bgAlertChannel' notifications" it only has the effect of completely disabling or enabling that channel. In order to customize the alert inside the channel I think I would need the "Glucose Alert Settings" alert with the bell symbol underneath it as I had on the previous phone in order to let me customize it.

Navid200 commented 3 years ago

Can you show the following please?

Settings -> Alarms and Alerts -> Glucose Alerts Settings

dbnsacc commented 3 years ago

Below should hopefully be a screenshot of those settings. I currently have volume profile on Ascending but have also used Medium at times.

sshot_GAS-07062021_033117

Navid200 commented 3 years ago

OK thanks.

I don't have an Android 11 phone. I will see if I can recreate this issue using the virtual devices in Android studio.

Navid200 commented 3 years ago

I finally have an Android 11 phone and can confirm that I experience this issue.

I wonder why this problem is only present in Android 11 and not 9. What do we have to do differently, in xDrip, so that it would work fine with Android 11 as well?

Navid200 commented 3 years ago

For some reason, I have got the ability to edit the settings for persistent high. But, not the others. I'm not sure why! Screenshot_20210827-212412