corona-warn-app / cwa-wishlist

Central repository to collect community feature requests and improvements. The CWA development ends on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
105 stars 14 forks source link

[Flight & Bluetooth mode] Missing notification / automatic activation of Bluetooth ... #402

Open Jo-Achim opened 3 years ago

Jo-Achim commented 3 years ago

Hi,

here are two points.

Missing Notification” (Android, version <= 10): When the airplane mode is switched on, Bluetooth is normally switched off at the same time and CWA shows a notification like: "If you want to use CWA, switch Bluetooth on ...". Right? Possible error: I wanted to take a screenshot of this notification today, but this notification did not appear on multiple attempts. If that is generally reproducible, this is a bug.

Currently: Bluetooth is automatically switched off under Android (version <= 10), when flight mode is switched on: Screenshot_20210319-112058_2


Automatic activation of Bluetooth” (extension): is it correct that on Android version 11 (and higher) Bluetooth stays on when the airplane mode is switched on, too? If so, is it correct that there is no reason to turn off bluetooth in conjunction with turning on airplane mode? If so, I would like to suggest the following change to the CWA functionality for Android (version <= 10) - also in connection with "Missing Notification" (above). (The following change should be general).

New: Bluetooth should also remain switched on under Android (version <= 10), when flight mode is switched on: Screenshot_20210319-112226_2

Best regards, Joachim.

PS: Android 10 with Android security update: February 1st, 2021 Nokia 7.1, Build: 00WW_4_16B_SP04 CWA version: 1.14.3 ENF: 18210613000 NetGuard Pro 2.294 Norton 360, v.5.4.1.5649

Last time I see the "Missing notice" (above) was on on Tuesday, March 16, 2021 (should have been CWA 1.14.3).

MikeMcC399 commented 3 years ago

@Jo-Achim

“Missing Notification” (Android, version <= 10): When the airplane mode is switched on, Bluetooth is normally switched off at the same time and CWA shows a notification like: "If you want to use CWA, switch Bluetooth on ...". Right? Possible error: I wanted to take a screenshot of this notification today, but this notification did not appear on multiple attempts. If that is generally reproducible, this is a bug.

I don't know in general what happens to Bluetooth in Android 11 when Airplane mode is enabled. Using Google's Pixel 3a emulator though I saw that enabling Airplane mode disables Bluetooth. I can imagine this might be device vendor or model specific.


This feature request should probably be moved to the cwa-app-android because it is very dependent on the API interface to the Google Exposure Notifications System.

MikeMcC399 commented 3 years ago

I wrote too soon after testing!

The notification for Google ENS regarding disabled Bluetooth came up some time after I finished writing, maybe 15 or 20 minutes later. I found it can take even 30 minutes before the notification appears.

MikeMcC399 commented 3 years ago

See also the bug report https://github.com/corona-warn-app/cwa-app-android/issues/2657 regarding wrong language for the Google Bluetooth notification.

Jo-Achim commented 3 years ago

@MikeMcC399,

thanks for testing.

It is correct that …

The notification for Google ENS regarding disabled Bluetooth came up some time after I finished writing, maybe 15 or 20 minutes later. I found it can take even 30 minutes before the notification appears.

I've just tried again. However, I remember that (earlier?) the notification was displayed much more quickly [seconds]; with which the user was informed almost directly of the consequence of switching on the airplane mode.

Thus - especially if the notification is controlled by Google's ENF and is therefore outside a time frame that can be influenced - the question remains whether and when CWA will notice something about switching on the airplane mode / switching off Bluetooth and, if necessary, could switch Bluetooth on again independently? Information displayed with a delay of 15-20 or 30 minutes appears to me 'a little late'. In this respect, my wish remains to switch Bluetooth on again automatically - even or especially after such a period; see: “Automatic activation of Bluetooth“ (above).

Joachim.

MikeMcC399 commented 3 years ago

Hi @Jo-Achim

I've just tried again. However, I remember that (earlier?) the notification was displayed much more quickly [seconds]; with which the user was informed almost directly of the consequence of switching on the airplane mode.

Yes, until quite recently the notification was made without delay.

Jo-Achim commented 3 years ago

So, that's the next problem in conjunction with 'Google ENF'!?

I am learning or my assumptions are confirmed: Projects that rely on the special functions of an operating system provider or that depend on its goodwill / quality are thankless business. In this respect: a good job, the CWA team!

Joachim.

ksturtzkopf commented 3 years ago

Would there be a way to add a CWA item to the Controls? It might seem like a small item (and I [think] it is), but it would give the user some peace of mind being able to control the CWA just a tiny bit better and being able to ensure with just a glance that it is currently enabled. Does this extend on the aforementioned proposal?

Velligis128 commented 3 years ago

I would like to enhance this feature request with a location based activation of bluetooth. I (and I would guess a lot more people) have bluetooth deactivated when I am at home. I often forget to turn it on when leaving the house, the the app is not really working... but when bluetooth would be turned on based on my gps-location (or when loosing contact to my home-wifi), this issue would be adressed.

At least my personal usage would go up be serveral 100 %.

Ein-Tim commented 3 years ago

@Velligis128 Something like this is proposed in #234.

As noted in #408, the app is not allowed to access GPS data (see also this statement from @thomasaugsten).

Ein-Tim commented 3 years ago

(cc @dsarkar) May I suggest to move this issue to the Android repo, iOS has never had such a notification and the op from @Jo-Achim only describes the behavior under Android.

Velligis128 commented 3 years ago

@Velligis128 Something like this is proposed in #234.

As noted in #408, the app is not allowed to access GPS data (see also this statement from @thomasaugsten).

Is it allowed to use the wifi name? Then you could use this as the identification for "home". (home is where my wifi connects automatically:p )

Ein-Tim commented 3 years ago

@Velligis128

I would say no, section 3.3 of the Exposure Notification APIs Addendum from Apple says:

"A Contact Tracing App may not use location-based APIs, may not use Bluetooth functionality (excluding Bluetooth functionality included in the Exposure Notification APIs) and may not collect any device information to identify the precise location of users. In addition, Contact Tracing Apps are prohibited from using frameworks or APIs in the Apple Software that enable access to personally identifiable information (e.g., Photos, Contacts), unless otherwise agreed by Apple.

I would consider Wi-Fi as personally identifiable information.

Velligis128 commented 3 years ago

Data protection over life protection. A little bit frustrating.

Jo-Achim commented 3 years ago

@Velligis128,

If I understand you correctly, you are looking for an automation option for switching Bluetooth on / off. Specifically, when you leave your home WLAN, you want to switch on Bluetooth (for the purpose of CWA) and - possibly additionally - when you are back in your home WLAN, switch Bluetooth off again automatically?

I am neither a specialist for Android nor for Android apps, but it could be that 'automation apps (like "Tasker", "MacroDroid" or similar) could automate your wishes outside of the CWA.

Correct? (If you have a solution, please post it here, thanks.)

Best regards, Joachim.

Velligis128 commented 3 years ago

@Jo-Achim Thanks 4 the hint, sometimes it seems I am not thinking straight.

--> In the end, there is a workaround to my problem. But I think that this is not really an option for the masses / unexperienced users. Still would prefere the option directly within CWA, but knowing that ENS will prohibit it.

Velligis128 commented 3 years ago

@Jo-Achim : So I tested it with marcodroid for those two weeks now:

  1. Yes, it is possible to do a corresponding marco
  2. The stability and the usability is quite low. The macro didn't activate bluetooth several times when I was leaving the geofence for a longer time. Could't find the reason in the sysloc (but although did not spend much time on it)
  3. And last - but this is quite obvious - the app needs a lot of rights to perform.

If I find some time, I might try another macro app, but in the end, it will always be a nasty workaround. But if it is working properly, it would be at least a good idea to put in in the FAQ for CWA.