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

Local push notifications for problems with the system or system settings #195

Open
jpbrandt opened this issue Sep 30, 2020 · 17 comments
Open
Assignees
Labels
enhancement New feature or request mirrored-to-jira This item is also tracked internally in JIRA

Comments

@jpbrandt
Copy link

jpbrandt commented Sep 30, 2020

Current Implementation

In the current version of the app for Android (1.3.1) the user didn't get any push notifications for necessary system settings, if e.g. the risk calculation isn't active because in some cases bluetooth was autom. deactivated. If the user deactivates bluetooth directly he gets a notification (no push). The user recognize this only by opening the app and is really upset about this.

Suggested Enhancement

It would makes sense, that the user autom. gets a local push notification, when something is not working regarding the system settings.

Expected Benefits

The user gets local push notifications to avoid that the app is running correctly and the user would be informed via push notification, if something is wrong. So he doesn't need to open the app to get such information.


Internal Tracking ID: EXPOSUREAPP-4711

@jpbrandt jpbrandt added the enhancement New feature or request label Sep 30, 2020
@daimpi
Copy link

daimpi commented Sep 30, 2020

@jpbrandt are you not getting push notifications from Android when something is wrong (e.g. location disabled)?

@heinezen
Copy link
Member

heinezen commented Jan 19, 2021

This is now mitigated with the dead man notification system.

As @daimpi said, there should be system notifications from Google/Apple when Bluetooth or Location settings are deactivated. I wonder if this is still an issue in CWA 1.10?


Corona-Warn-App Open Source Team

@heinezen heinezen moved this from Initial to Waiting for Input in [CM] cwa-wishlist Jan 19, 2021
@Ein-Tim
Copy link
Contributor

Ein-Tim commented Jan 19, 2021

Under iOS yes, CWA will stop working silently if the device runs out of space: corona-warn-app/cwa-app-ios#1521
Still, for me, it would be ok to close this in favor of #189

@MikeMcC399
Copy link
Contributor

This is now mitigated with the dead man notification system.

As @daimpi said, there should be system notifications from Google/Apple when Bluetooth or Location settings are deactivated. I wonder if this is still an issue in CWA 1.10?

In Android there is an immediate notification if Bluetooth is disabled, which the user is able to dismiss. The app displays the status "BLUETOOTH TURNED OFF" and by tapping on that, the detailed Exposure Logging status "Restricted" is displayed.

AFAIK the dead man notification will only trigger if no exposure checks were done for 36 hours. I don't believe it gets activated due to disabled Bluetooth. I will try it out and see what happens in Android 1.10.1.

@cwa-bot cwa-bot bot moved this from Waiting for Input to ToDo in [CM] cwa-wishlist Jan 19, 2021
@Ein-Tim
Copy link
Contributor

Ein-Tim commented Jan 19, 2021

AFAIK the dead man notification will only trigger if no exposure checks were done for 36 hours. I don't believe it gets activated due to disabled Bluetooth. I will try it out and see what happens in Android 1.10.1.

Under iOS there are no exposure checks when Bluetooth is disabled so deactivated Bluetooth for longer than 36h will lead to a Dead Man notification.

@dsarkar
Copy link
Member

dsarkar commented Jan 20, 2021

@MikeMcC399, @Ein-Tim

On deactivating BT I get on

  • Android: immediately an OS push notification, but even after several days CWA says that 'Risiko-Ermittlung' is active permanently. We have a ticket for the latter issue here on GitHub and JIRA.
  • iOS: no OS push notification, but CWA quite immediately indicates that 'Risiko-Ermittlung' is stopped.

Altogether it is at least an inconsistent behavior between both systems and should be aligned. It is discussed internally.

@Ein-Tim
Copy link
Contributor

Ein-Tim commented Jan 20, 2021

Okay thanks @dsarkar.

It is inconsistent since it is possible to do exposure checks even without Bluetooth under Android, but under iOS this is not possible.

Will you still go on and close this Issue?

@dsarkar
Copy link
Member

dsarkar commented Jan 20, 2021

Actually, the recent EN-Google issue proved that notifications are triggered when necessary. This resulted in notification spam, which is being addressed by developers.

@dsarkar
Copy link
Member

dsarkar commented Jan 20, 2021

@jpbrandt any objections to closing this issue?

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jan 21, 2021

@dsarkar

The original wishlist item was about Android, and this posting is also about Android.

Bluetooth disabled
As promised, I ran a test on an Android device with exposure logging activated and Bluetooth disabled for more than 36 hours. The device was connected to a charger all the time. The configuration was Android 8.0.0, Exposure Notification System (ENS) 18204714000, CWA 1.10.1.

Immediately after disabling Bluetooth the following notification appears, which is triggered by Google ENS:

image

There is no repeat of this warning and the user can dismiss it (see CLEAR for instance in the screen shot).

During the time that Bluetooth was disabled CWA continued to execute exposure checks every 4 to 5 hours.

No Internet
It is not necessarily an error condition if there is temporarily no internet available, however if this continues for a longer time, then the exposure checks are based on old Diagnosis Key data. To mitigate this situation the deadman notification is triggered by CWA which appears if no exposure checks have been carried out for more than 36 hours. Here is a screen shot from a previous test:

Deadman notification after power on

Note that a fix is in the pipeline (see v1.11.0-RC1) to display the full text of the notification correctly.

Summary
The two conditions related to system settings:

  • Bluetooth disabled
  • No internet for more than 36 hours

are notified to the user without the CWA having to be opened.

I think that this issue could be closed unless @jpbrandt tell us there are other system settings he thinks should be considered.

Battery optimisation issues should also be covered because ENS wakes up COVID-19 apps. I will also check this out, but that will take another 2 days of waiting for deadman notification.

@Ein-Tim
Copy link
Contributor

Ein-Tim commented Jan 21, 2021

Thanks @MikeMcC399.

The question what happens if the device runs out of space is still there, but this can be answered in #189.

@MikeMcC399
Copy link
Contributor

@Ein-Tim

The question what happens if the device runs out of space is still there, but this can be answered in #189.

Available space is another topic which I didn't consider because it is not a setting which can be switched on and off by the user like Bluetooth, Wi-Fi, Mobile data or battery optimisation. Behaviour when space is lacking is very operating system specific, like the other user controlled options, so it probably makes more sense to cover them in the respective app issue repos.

I will come back to this topic in a couple of days. There were several issues in the Android repo in the early days about the app incorrectly reporting lack of space, and I assume that it has become more robust in the meantime, however I have never checked this out.

@Ein-Tim
Copy link
Contributor

Ein-Tim commented Jan 21, 2021

There were several issues in the Android repo in the early days about the app incorrectly reporting lack of space, and I assume that it has become more robust in the meantime, however I have never checked this out.

I also remember some cases where the ENF pushed a notification to the user which said that there was not enough space for ENF to run, but this were bugs. So I also assume that this got better

@MikeMcC399
Copy link
Contributor

I filled up available space on an Android 11 emulator and got the following notification:

image

I also tried to add new entries to the Contact Journal at this time and CWA gave me an error CAUSE: 9002 Something went wrong. database or disk is full (code 13 SQLITE_FULL)

Database or disk is full

This is by no means an exhaustive test, but it does show that Android may give notification (without opening the app) and if the disk is full when a function is carried out it can give an appropriate error message. What happens with a full device probably depends on the Android version and the device vendor.

@heinezen heinezen changed the title Local push notifications for problems with the system settings etc. Local push notifications for problems with the system or settings Jan 21, 2021
@heinezen heinezen changed the title Local push notifications for problems with the system or settings Local push notifications for problems with the system or system settings Jan 21, 2021
@heinezen heinezen moved this from ToDo to In Progress in [CM] cwa-wishlist Jan 21, 2021
@Ein-Tim
Copy link
Contributor

Ein-Tim commented Jan 21, 2021

Thank you @MikeMcC399!
@heinezen maybe this could be checked for iOS too?
Thank you!

@cwa-bot cwa-bot bot moved this from In Progress to ToDo in [CM] cwa-wishlist Jan 21, 2021
@heinezen heinezen added the mirrored-to-jira This item is also tracked internally in JIRA label Jan 21, 2021
@cwa-bot cwa-bot bot moved this from ToDo to Mirrored to Jira in [CM] cwa-wishlist Jan 21, 2021
@heinezen
Copy link
Member

I've creates a more general ticket for these issues. Feel free to add more suggestions were push notifications are useful.


Corona-Warn-App Open Source Team

@MikeMcC399
Copy link
Contributor

On a Samsung Galaxy A5 (2017) SM-A520F, Android 8.0.0, Exposure Notification System (ENS) 18204714000, CWA 1.10.1. I activated the MID Power saving mode with Background network usage disabled. I then left the device unattached to a charger for 36 hours without touching it, as a test.

When I activated the screen it showed the Corona-Warn deadman notification reminder to open the app, which I did. A successful exposure check was immediately carried out. The previous successful exposure check was 36 hours earlier.

So with MID Power saving I can say that the user would be warned and can take successful corrective action.

It is not necessary to open the app to get the notification. It is only necessary to open the app to get it to carry out an up-to-date exposure check.

(There is a higher level of Power saving mode called MAX on this device. I didn't test this because the Corona-Warn-App cannot be opened at all with this extreme power-saving mode. Only a small number of specially designated apps can be opened when MAX Power saving mode is activated, and CWA is not one of these apps.)

@cwa-bot cwa-bot bot moved this from Mirrored to Jira to ToDo in [CM] cwa-wishlist Jan 23, 2021
@heinezen heinezen moved this from ToDo to Mirrored to Jira in [CM] cwa-wishlist Jan 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request mirrored-to-jira This item is also tracked internally in JIRA
Projects
[CM] cwa-wishlist
Mirrored to Jira
Development

No branches or pull requests

7 participants