Open TheConen opened 3 years ago
@TheConen Can you show the consequence of having the persistent foreground notification enabled? I mean can you show the notification that you don't like to see? Also, can you explain how you enable or disable it?
@TheConen Also, based on your description here, I take it you have successfully used the notification number. If yes, would you please update your comment in this link? https://github.com/NightscoutFoundation/xDrip/issues/864#issuecomment-890316275 In that link, you sound like you still don't know how to use it. Or, please explain if I am misunderstanding one or the other.
When running the collector in foreground (Settings -> Less common settings -> Other misc. options -> Run collector in foreground), it displays a permanent notification showing the current graph (see picture 1). When using notification channels (Settings -> Glucose Alerts Settings -> Notification channels) and ongoing notification channels (Settings -> Glucose Alerts Settings -> Use ongoing notification channel) you are able to tell Android to hide the Category "Ongoing Notifications" (see picture 2) - however, this has the undesired effect to also hide the number icon in the status bar which I would like to keep (see picture 3).
Picture 1: The (undesired) persistent foreground notification of the collector
Picture 2: Android notification settings, the category "Ongoing notifications" controls the persistent notification as well as the number icon in the status bar so one cannot be disabled without disabling the other
Picture 3: The (desired) number icon in the status bar, next to the clock
I would be happy with an option to hide the graph and show a very small persistent notification with just the current reading (similar to what happens when you pull down the drop-down menu fully, see picture), but I haven't been able to find such an option.
@TheConen Thanks for the descriptions. It is very well done. If you need to upload any more images, please reduce the size of each image you upload such that it shows the required detail, but, no more.
Would you please do an experiment? In picture 1, would you please swipe right on the notification graph? It should expose a cog on the left side of the image. Tap on the cog. Tap on minimize. Restart the phone. How does it behave now?
If I tap on the cog, I get into the settings shown previously in picture 2. There is no option to minimize there.
I'm active on the Nightscout discord, if you want to have a direct conversation about this (TheConen#5376). You can also take a look via TeamViewer/AnyDesk if that helps you.
I think part of the issue is that the number icon is a part of the persistent notification. To be able to show/hide them independent from each other, they need to be two separate notifications. Alternatively an option to hide the graph in the persistent notification so that it is not that big would be nice.
Even if a developer creates a pull request making the change you are requesting, there is no guarantee it will be merged. The reason usually is one of the following: 1- There is a work-around already. 2- The change is not absolutely necessary and the users can live with xDrip as is. 3- There is no work-around; it is a good thing to have; but, the implementation is too complicated or breaks something else, or may break something else, but, cannot be verified.
All of those can be considered now, before any developer spends any time on it. So, that's what I'm trying to do now hoping to identify the best path forward by asking questions that may be asked later.
Someone may ask "why do you need to see your reading number on the notification bar; why not have it as a widget"? I'm not saying that. But, we need to consider all the questions we will be asked. Creating a pull request is not necessarily going to be a step forward. It may just be a waste of time if it will never be merged.
@TheConen Would you please edit the first post and add to it: 1- xDrip version you have tried 2- The phone details including brand, model and Android version on it
I added the details you asked for in the first post.
To answer the hypothetical question of "why do you need to see your reading number on the notification bar; why not have it as a widget": I want to be able to see my blood sugar at a glance at any time without needing to interact with the phone, this includes situations like using my phone for navigation in the car where I am not able to see the widget on my home screen. The number icon achieves this, but with the number icon being active, the extremely huge persistent notification is a big annoyance and completely unnecessary, hence I would like to get rid of it - or at least not have it use basically the whole notification space.
@TheConen For clarification purposes again, this is what you have written:
I don't need (and want) the persistent foreground collector notification when I can use the number icon.
The only time you will see the foreground collector notification is when you pull down from the top of the screen to see all notifications. Under normal circumstances, that notification isn't visible. Is that correct?
No, that is not correct - the notification is also visible at all times on the lockscreen. although it has a normal size there. Since the notification is extremely huge in the pull-down menu, it takes so much place that I can see at most one other notification at the same time, forcing me to scroll through my notifications if I have multiple notifications. Normally I would be able to see at least 3 different notifications at the same time, being able to directly click on the notification that is of current interest to me. I can't do that with the persistent xdrip+ notification.
@TheConen
the notification is also visible at all times on the lockscreen
That was not my question.
When you turn your phone on, if you don't pull down from the top of the screen, do you see the large notification?
I don't.
So, either we are talking about different things here, or we are not describing the issue correctly.
When I turn my phone on und do not unlock it, I see the notification, however a bit smaller without the graph (notification on lockscreen, picture 1). When I turn the phone on, do not unlock it and swipe down, I see the notification (notification menu from lockscreen, picture 2). When I turn the phone on, unlock it and swipe down, I see the notification (notification menu from unlocked phone, picture 3).
Outside of these 3 conditions, the notification is not visible.
Ideally, I would like to see the notification under none of these circumstances and just have the number icon, if possible. I can tell Android to hide the notification, but hiding the notification also hides the number icon.
Picture 1: Notification on lockscreen
Picture 2: Notification in pull-down menu on lockscreen
Picture 3: Notification in pull-down menu on unlocked phone
@TheConen Have you seen this? https://github.com/NightscoutFoundation/xDrip/issues/750#issuecomment-458932675 I don't think you can disable the persistent notification. What do you think?
As mentioned in the comment you linked, you can tell Android to hide the persistent notification ("To minimize this notification either just select to minimize it or not show it by long pressing on the notification"). The persistent notification will still be there for the system, resulting in xdrip+ not being killed, Android will just not show it to you. However, if you do hide the persistent notification, right now this will also hide the notification icon. I would like to be able to hide the persistent notification without hiding the notification icon.
@TheConen Let me see if I can find, in the code, where I can add a notification channel for the notification icon.
Is your feature request related to a problem? Please describe.
Currently the persistent notification for the foreground collector and the number icon use the same notification channel (Ongoing notification), so it is impossible to tell Android to hide one (e.g. the persistent collector notification) without hiding the other (the number icon) as well.
Describe the solution you'd like
Different notification channels for the persistent foreground collector notification and the number icon. I don't need (and want) the persistent foreground collector notification when I can use the number icon.
Describe alternatives you've considered
I tried turning off the foreground collector service which will get rid of the persistent notification, but also the number icon, so that's not an option.
//Edit xdrip+-version: self-compiled from 3df0152195b980e42ad78c853dd2c122c10fb96f with PR #1388 merged (https://github.com/TheConen/xDrip) Phone details: OnePlus Nord 2 5G with Oxygen OS 11.3 based on Android 11