covid-be-app / cwa-app-android

Native Android app using the Apple/Google exposure notification API.
https://coronalert.be
Apache License 2.0
53 stars 10 forks source link

Android 10: Battery optimization on "intelligent" instead of "don't optimize" #77

Closed Forceflow closed 3 years ago

Forceflow commented 3 years ago

Device: Oneplus 5 Android version: 10.0 App version: 1.5.4 (origin: Play Store)

On my (vanilla) Android 10 system, the introductory wizard explains how the background battery optimization should be turned off for optimal usage of the app, and the in-app slider confirms that the setting is configured correctly.

But when I manually go to the Android settings and check battery optimization on a per-app basis, I see the Coronalert app is still on the default "intelligent" (and thus, interruptable whenever Android feels like it) setting. I am under the impression that it should be set to "don't optimize", but this is something a regular end-user probably isn't going to do.

Is this a problem for app functionality or working as expected?

coronalert coronalert_intelligent

roidelapluie commented 3 years ago

Note that this should not prevent the app to log the contacts ; it will just only download data from the central server less often to let you know if you have been in close contact, I think.

Forceflow commented 3 years ago

Okay, that's not a big problem then, I guess. Android permissions are a jungle.

leroynicolasalexi commented 3 years ago

Hi, thanks for the feedback. App is asking the OS to whitelist the app from battery optimization, but it's up to the OS to implement that more or less correctly from my understanding. I can reproce this myself on oneplus, but the flag in code still says the battery optimization is disabled, so I don't know if it has an effect or not on that particular device