Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

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

Open
Jo-Achim opened this issue Mar 19, 2021 · 16 comments
Labels
feature request A new feature proposal for the app

Comments

@Jo-Achim
Copy link

Jo-Achim commented Mar 19, 2021

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).

  • Airplane mode is turned ON (e.g. by user and Bluetooth on Android may be turned OFF):
  • CWA checks whether Bluetooth is now switched off.
  • If not: done.
  • If so: CWA automatically switches Bluetooth on again (or tries to prevent it from being switched off) and checks that Bluetooth is switched on.
  • If the check was successful (Bluetooth now switched on): done.
  • If the check was not successful (Bluetooth still switched off): Notification "If you want to use CWA, switch Bluetooth on ..." (see “Missing Notification” above)

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).

@Jo-Achim Jo-Achim added the feature request A new feature proposal for the app label Mar 19, 2021
@Jo-Achim Jo-Achim changed the title [Flight & Bluetooth mode] Missing notice / automatic activation of Bluetooth ... [Flight & Bluetooth mode] Missing notification / automatic activation of Bluetooth ... Mar 20, 2021
@MikeMcC399
Copy link
Contributor

@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.

  • The notification you refer to is generated by the Google Exposure Notifications System, not by the CWA app.
  • It seems that Google has switched off this notification. Whether that difference is caused by a version change or a configuration parameter change by Google is impossible to say without insider Google knowledge. All I can add is that I have the same ENS version as you (18210613000) and I am not getting a notification like I used to when Bluetooth is disabled.

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
Copy link
Contributor

MikeMcC399 commented Mar 20, 2021

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
Copy link
Contributor

See also the bug report corona-warn-app/cwa-app-android#2657 regarding wrong language for the Google Bluetooth notification.

@Jo-Achim
Copy link
Author

@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
Copy link
Contributor

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
Copy link
Author

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
Copy link

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
Copy link

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
Copy link
Contributor

Ein-Tim commented Mar 26, 2021

@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
Copy link
Contributor

Ein-Tim commented Mar 26, 2021

(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
Copy link

Velligis128 commented Mar 26, 2021

@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
Copy link
Contributor

Ein-Tim commented Mar 26, 2021

@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
Copy link

Velligis128 commented Mar 26, 2021

Data protection over life protection.
A little bit frustrating.

@Jo-Achim
Copy link
Author

@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
Copy link

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

  • I used MacDroid and it provides that functionality based on geofencing. Will check how well it is working the next days, as well monitoring the effects the power consumption.
  • WiFi-SSID-based triggering is no longer available in the PlayStore-Version of the APP, as google is restricting the access to those APIs. AFAiK It is available if you are installing it from other sources. I'll check that as soon as I have some spare time available, as this is my preferred option as it is supposed to consume less power and I am not so happy with providing my GPS-data all the time.

--> 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
Copy link

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request A new feature proposal for the app
Projects
None yet
Development

No branches or pull requests

5 participants