-
Notifications
You must be signed in to change notification settings - Fork 497
Prevent battey optimisation #522
Comments
Very good point. Made me think about the difficulty of verifying correct operation (it's a black box right now without logging). See my issue #525 that would help test if this is indeed an issue. |
This is not an issue for the app. The actual contact tracing is done by Google Play Services which are exempt from battery savings (you can easily check this): The Corona Warn Android App is just a "display" and "data store". If you kill it or put it to sleep nothing bad happens. Google Play Services still collect beacons. When app wakes up, it gets all collected information as bulk (see code and also example implementation provided by Google). So this issue can be closed, IMHO. |
I already assumed this. But doesn't that mean that the app cannot inform you of any contact with infected persons, when it is not opened regularly?
I guess you know what you're talking about, just for my interest: How then does it work? |
The inform is only done once per day. And the app is woken up by OS for this and downloads a quite large file (depending on how many infections are there). For privacy reasons they don't use push services. See the scheduling code. The same applies for sending data of infected people. And trust me: Most people will open app from time to time... |
Thanks for clearing things up, @uschindler :D |
So, you need the app to see whether there are any problematic encounters? You wont't get notified? |
Especially Xiaomi Devices (MIUI operating system) uses a very aggressive MIUI power management system which kills apps running in the background and lead to missed notifications. Perhaps another check in the first-start-setup-wizard which leads the user to the settings to disable the power optimization will improve things.
I think some people will install the app and leave it untouched on their system. They won't get notifications with an aggressive power management system. In my opinion, this issue is still relevant. |
Sorry, after download they show a notification. Only the Android internal (provided by Google Play Services) PUSH notfications through Google's infrastructure are not used. |
So one needs to know whether
on Xiaom devices as well or if they modified something related to this. |
afaik Xiaomi devices don't work because they don't support Google Play services (see Play Store reviews). But maybe this is only the case for some devices |
Btw wouldn't it be better to exclude devices that
from installing in the Play Developer Console? This might be confusing for some users. |
If you buy a Xiaomi phone you can choose between a Google Play Service or a non Google Play Service version. The first option is the default for most European citizens, the second one more for Asian, especially Chinese citizens due to several governance regulations. So the app will work on the first version. |
More than one month later, exactly this problems seems to be an issue for the app: |
@tobidwest this issue was about the exposure notifications. The daily update was discussed in another issue. |
Sorry, we also discussed about the background risk calculation, sorry, this may have been delayed (but I said this in my original post). Still I have to say: the recently deployed fixes don't fully prevent the issue, it's still a good idea. It often happens that the risk status is only updated when you open the app (you see the status message). This happens with and without background notifications. E.g., if the phone is on deep sleep, it can't wake up. On the other hand the BILD Zeitung is as usual very aggressive, because they just have the black-and-white (sorry for this term) communication to readers. As said in my original post, most people will open the app from time to time, so the issue is not as bad as communicated. As the update is daily only a delay of some hours don't make the "kraut fett". |
Feature description
When first starting the app, the app shoud open the device's settings explain how to disable battery optimisation.
Problem and motivation
By default, Android optimises the battery consumption by killing apps running in the background. This might cause tracing not to work as intended.
Is this something you're interested in working on
No, unfortunately, I do not have any experience on how to implement this.
The text was updated successfully, but these errors were encountered: