Cwa-app-android: Bluetooth status reported incorrectly after long idle time (deep sleep/ doze)

Created on 18 Jun 2020  路  8Comments  路  Source: corona-warn-app/cwa-app-android

Describe the bug

After the last two nights, where I did not use my phone and had it sitting on a table, the bluetooth status in the CWA is incorrectly reported as deactivated.
Bluetooth still works for others devices (smartwatch), so the hardware definetly is active after using the phone again in the morning.
After toggling the bluetooth switch twice (from on to off and off to on) the CWA correctly reports bluetooth as working again.

I suspect some kind of deep sleep mechanism in Android which activates when no movement of the phone is detected.
My phone is using Android 9 and I think such a feature was introduced in Android 7 or 8.

Expected behaviour

The bluetooth status should be correctly recognized even after the phones deep sleep.

Steps to reproduce the issue

  1. Activate App and Exposure notification.
  2. Keep Bluetooth activated.
  3. CWA Status is working.
  4. Let phone sit on table for a few hours without charger (but enough for it to not poweroff).
  5. Check CWA status which is complaining about disabled Bluetooth (even though Bluetooth is still on).

Technical details

  • Device: OnePlus 3T, Android 9

Possible Fix


Internal Tracking ID: EXPOSUREAPP-1941

UX bug documentation mirrored-to-jira

Most helpful comment

All 8 comments

Same Problem on two OnePlus 6 with Android 10/Oxygen 10.3.4.

Maybe a problem with the Oxygen battery optimation. I have disabled it for CWA and will report the result tomorrow.

I noticed the same behavior with my OnePlus 3 running OxygenOS 9.0.6 (which is an Android 9). The status changed back to active after switching out of the app and back to it again.

Since i deactivated battery optimization, i haven't seen this error message anymore.

Screenshot_20200620-115636

Since i deactivated battery optimization, i haven't seen this error message anymore.

Screenshot_20200620-115636

I made the same experience.

So I would propose to add an info screen in the app for people to deactivate battery saving.

Or talk with manufactures to add exceptions to their battery saver if that is possible ( for old phones).

I can confirm the same issue on a OnePlus 7T with recently updated OS (Oxygen OS 10.0.11.HD65BA). Deactivating power optimization seemed to fix the issue, at least it seemed fixed this morning.

Copy that for OnePlus 7T Pro with Oygen10.0.9.HD01BA. Trying deactivation of power optimization.

Solved in CWA version 1.5, so I'm closing this. Please report back if the issue still persists.


Corona-Warn-App Open Source Team

Was this page helpful?
0 / 5 - 0 ratings