cwa-app-android icon indicating copy to clipboard operation
cwa-app-android copied to clipboard

Android - Prioritised background activity - PRIORISIERTE HINTERGRUNDAKTIVITÄTEN - cannot be activated or deactivates itself

Open dsarkar opened this issue 3 years ago • 21 comments

We have some reports from the app stores, that the prioritized background activity (PRIORISIERTE HINTERGRUNDAKTIVITÄTEN) cannot be activated (case 1) or deactivates itself (case 2) on their ANDROID devices. We would appreciate some feedback here from the community. Thank you very much. Best wishes, DS


Corona-Warn-App Open Source Team


Environment:

  • PROD
  • Version 1.7.1
  • Android devices

Preconditions:

  • CWA 1.7.1 installed

CASE 1: Prioritized Background activity cannot be turned on anymore

Steps:

  • Open the app
  • Open App settings
  • Try to turn on the Prioritized Background activity

Expected result:

  • Prioritized Background activitycan be activated

Actual Result:

  • Prioritized Background activitycannot be activated

Reported cases:

  • v1.7.1 (1070101) Android 10.0, Galaxy s20+ 5g (y2s)
  • v1.7.1 (1070101) Android 6.0, Galaxy tabs 10.5 (chagalllte)
  • v1.7.1 (1070101) Android 8.0, Galaxy s7 edge (hero2lte)
  • v1.7.1 (1070101) Android 10.0, Galaxy s10 (beyond1)

CASE 2: Prioritized Background will be disabled automatically

Steps:

  • Open the app
  • Open App settings
  • Check the status of Prioritized Background activity

Expected result:

  • After the activity was turned on once, it will not be disabled automatically

Actual Result:

  • Prioritized Background was disabled automatically after closing and reopening the app

Reported cases:

  • v1.7.1 (1070101) Android 10.0, Mi 9 lite (pyxis)
  • v1.7.1 (1070101) Android 9.0, Oneplus3t (oneplus3t)

Related issues:


Internal Tracking ID: EXPOSUREAPP-4293 CASE 1 Internal Tracking ID: EXPOSUREAPP-4301 CASE 2

dsarkar avatar Dec 14 '20 07:12 dsarkar

@dsarkar

We have some reports from the app stores, that the prioritized background activity (PRIORISIERTE HINTERGRUNDAKTIVITÄTEN) cannot be activated or deactivates itself.

Can you share any data about which particular makes / models of smartphones are affected according to the Google Play Store feedback so far?

MikeMcC399 avatar Dec 14 '20 09:12 MikeMcC399

Edited first post with more details. DS.

dsarkar avatar Dec 14 '20 10:12 dsarkar

With Samsung Galaxy A50 SM-A505FN / Android 10 / CWA 1.7.1 I was able to disable and enable Prioritized Background Activity successfully. I don't recall the device spontaneously enabling optimised battery usage and exposure checks have been working without issue for quite some time.

I find the experience confusing though because of the use of the terms which are defined logically opposite to each other in CWA compared to the Android operating system.

Prioritized Background Activity on = optimised battery usage off Prioritized Background Activity off = optimised battery usage on

The text "You can activate and deactivate prioritized background activity in your device settings." is not literally true. I can activate and deactivate optimised battery usage in my device settings.

Start out with Prioritized Background Activity (off) = optimised battery usage (on)

Enable Prioritized Background Activity

CWA > Settings > Prioritized Background Activity > OPEN DEVICE SETTINGS shows Optimise battery usage with filter "Apps not optimised" so now I have to change the filter to "All" so I can find Corona-Warn which is showing enabled = optimised battery usage on. Now I tap Corona-Warn which disables it = optimised battery usage off. Go back to CWA which correctly shows "Prioritized Background Activity" On.

Disable Prioritized Background Activity

CWA > Settings > Prioritized Background Activity > OPEN DEVICE SETTINGS shows Optimise battery usage with filter "Apps not optimised" Corona-Warn shows disabled = optimised battery usage off So now I have three logical states to keep in my head: Optimise / filter not optimised / switch off (which applies of course to the heading "Optimise battery usage" and not to the filter "Apps not optimised"). Now I tap Corona-Warn which immediately removes it from the filtered list without showing it in enabled optimised battery status. I change the filter from "Apps not optimised" to "All" and find Corona-Warn enabled in the list. Go back to CWA which correctly shows "Prioritized Background Activity" On

I can think of better user experiences than this! 😱

MikeMcC399 avatar Dec 14 '20 11:12 MikeMcC399

Related issues: Improve UX for disabling battery optimization - Internal Tracking ID: EXPOSUREAPP-3835

dsarkar avatar Dec 14 '20 11:12 dsarkar

I'm also experiencing case 2 problems on a on a oneplus 3t with Android 9 (stock). After turning on the prioritized background activity it turns itself off after a few days. Any solution yet?

raptor321 avatar Jan 18 '21 01:01 raptor321

@raptor321 Are you using the latest version of the app (1.10.1)? At least on my Samsung Galaxy, selecting Prioritized Background Activity in the app doesn't actually switch it on, it just allows you to use Android's settings to select the app and disable the optimised battery usage settings yourself. I assume that is what you are doing.

It might be helpful to see some screen shots from your device battery settings. The battery optimisation is very device specific, and if it is getting reset, it is more likely to be due to the device and not due to the CWA app.

I found one mention in the https://forums.oneplus.com/threads/battery-optimization-settings-are-reset-for-some-apps.769615/ for a beta software where the device was resetting optimisation settings. It's an old post, but it does describe the problem.

MikeMcC399 avatar Jan 18 '21 08:01 MikeMcC399

@raptor321 as @MikeMcC399 suggests:

  • screenshots would be appreciated
  • CWA 1.10.1 ?

Many thanks, DS

dsarkar avatar Jan 20 '21 11:01 dsarkar

Hi and sorry that it took me some time. It's like @MikeMcC399 suggests. By clicking on prioritized background activity the phone changes in the battery optimization settings. I have to change from "not optimized" to "all apps" and change the cwa app manually to not optimize. The problem is that it resets after some time. I couldn't figure out if there is a certain time period or if anything else triggers a reset. Since you asked im using cwa v1.10.1 Screenshots are attached Screenshot_20210121-232608 Screenshot_20210121-232649 Screenshot_20210121-232656

raptor321 avatar Jan 21 '21 22:01 raptor321

@raptor321 It's good to see the screen shots which look like the Google Pixel 3a with Android 11.

  • Is there any firmware update available for your device which you could install?

  • Are exposure checks still done if the device has set Corona-Warn back to battery optimised (Akkuverbrauch optimiert) or do you at least get a warning if no check has been done for 36 hours?

MikeMcC399 avatar Jan 22 '21 07:01 MikeMcC399

@MikeMcC399 oneplus delivers a very clean android. Sadly the device is older then four years is not longer supported by the manufacturer. So there are no more updates. I turned off the prioritized background activity and will check if it still does checks or if I get a warning.

raptor321 avatar Jan 22 '21 08:01 raptor321

@raptor321

Sadly the device is older then four years is not longer supported by the manufacturer. So there are no more updates.

That is a pity, because I think the issue about battery optimisation being reset could only be fixed by the device vendor.

I turned off the prioritized background activity and will check if it still does checks or if I get a warning.

I'm also doing a test on a Samsung device with all possible battery optimisation enabled (so worst case for CWA) and I should have the results in 36 hours.

MikeMcC399 avatar Jan 22 '21 09:01 MikeMcC399

After a test I got no warning after more then 36 Hours, BUT: the exposure checks are still being done. I checked at 11pm and the last check was at 12:29am. So I think it doesn't check as often as it could, but it still does!

raptor321 avatar Jan 24 '21 22:01 raptor321

@raptor321 Thank you for your observations. We have added your information to the developer's ticket. Best, DS

dsarkar avatar Jan 26 '21 08:01 dsarkar

Hello everyone,

This might be fixed in CWA release 2.2. Please retest after the update.


Corona-Warn-App Open Source Team

heinezen avatar May 09 '21 15:05 heinezen

It would be good to hear back from users who were having specific problems with the Prioritized Background Activity function, about whether their experience has improved with the new 2.2.1 release.

I checked I could enable and disable Prioritized Background Activity in the new CWA Android version 2.2.1 on my Samsung Galaxy A50, Android 11. I wasn't previously having any technical issues on this device though. The only usability issue remaining for me is the complexity of the user interface, for which there is still a wishlist item open https://github.com/corona-warn-app/cwa-app-android/issues/1884.

MikeMcC399 avatar May 13 '21 14:05 MikeMcC399

I'm using v2.2 since Monday. I enabled prioritized background activity and it did not turn off till then. I will try not open the app for a few days and check back if anything has changed.

raptor321 avatar May 19 '21 18:05 raptor321

One week of using, 5 days without opening the app and its still working! Seems like the problem is solved. If anything changes I will report again.

raptor321 avatar May 24 '21 08:05 raptor321

@raptor321 Thank you very much for your feedback! Best, DS


Corona-Warn-App Open Source Team

dsarkar avatar May 24 '21 08:05 dsarkar

Round and round it goes... I'm very sorry, but as I opened the app today, the prioritized background activity was deactivated again... The app is on v2.2.1. According to the play store the last update was two weeks ago. I open the app 1-2 times a week. I did not change any settings.

raptor321 avatar Jun 01 '21 02:06 raptor321

@raptor321 Thanks for notifying us.

We suspect that the problem might be vendor-specific in some cases, which unfortunately would mean that this cannot be fixed by the CWA team. The OS of some vendors will override the prioritized background settings after a while, even if they were manually set. The way to fix this would have to be a firmware update.


Corona-Warn-App Open Source Team

heinezen avatar Jun 01 '21 12:06 heinezen

Maybe that's my problem. Oneplus is not offering further firmware updates. But I wanted to notify anyway.

raptor321 avatar Jun 01 '21 15:06 raptor321