corona-warn-app / cwa-app-android

Native Android app using the Apple/Google exposure notification API. 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
2.44k stars 495 forks source link

Vaccination certificate 1/2 detailed view changes background color #3927

Closed MikeMcC399 closed 3 years ago

MikeMcC399 commented 3 years ago

Avoid duplicates

Technical details

Describe the bug

The detail view of a digital COVID vaccination certificate where the certificate is not the final one of a series is shown with a grey background, but only if the final vaccination certificate is not also stored on the device.

Steps to reproduce the issue

(Updated for version 2.11.2)

  1. Remove any existing certificates from the device
  2. Tap "Certificates" tab (tap "CONTINUE" if necessary), tap "+ CERTIFICATE"
  3. Scan in a 1/2 vaccination certificate
  4. Note that it is shown with a grey background
  5. Tap back arrow
  6. Tap "+ CERTIFICATE"
  7. Scan in a 2/2 vaccination certificate (vaccination more than 14 days ago)
  8. Note that it is shown with a blue background
  9. Tap back arrow, tap right arrow
  10. Scroll down to Vaccination 1 of 2 and tap it
  11. Note that it is shown with blue background
  12. Tap back arrow
  13. Tap Vaccination 2 of 2
  14. Tap three-dot symbol, tap "Remove Certificate" and tap "REMOVE"
  15. Tap Vaccination 1 of 2
  16. Note that now it is shown with grey background, which is different from in step 11

This is an example, created by scanning in https://www.coronawarn.app/assets/screenshots/2-6/en/ios/iPhone%2011%20Pro-screenshot_first_vaccination_certificate_details_part1.png: (example removed because unsigned certificates can no longer be scanned in using CWA version 2.7 and later).

Expected behavior

The background color for the detail display of a non-final vaccination certificate should not change depending on whether the final vaccination certificate is also stored on the device.

Implicitly the detail display of one certificate is only about that one certificate being displayed and the display should not depend on other states on the device, like the characteristics of an additional certificate also stored on the device.

Possible Fix

Make the background color of a vaccination certificate in the certificate detailed view depend only on the characteristics of the certificate itself.

The background color / gradient (and Europe stars) looks like they are set in VaccinationDetailsFragment.kt

Additional information

Note that trying to scan the Andrea Schneider vaccination certificate in 2.7.x and higher fails with the error HC_DSC_NO_MATCH because it fails the signature check. Tests with these higher versions need to be carried out with correctly signed digital COVID vaccination certificates.


Internal Tracking-ID: EXPOSUREAPP-9076

Jo-Achim commented 3 years ago

@MikeMcC399

Make the background color of a vaccination certificate in the certificate detailed view depend only on the characteristics of the certificate itself.

If I understand correctly... This means, the background color of certificate (1/2) - non-final vaccination - always should be gray and the background color of certificate (2/2) - final vaccination - always should be blue. The background color of certificate (1/1) - final vaccination - always should be blue, too. I think that would be correct.

MikeMcC399 commented 3 years ago

@Jo-Achim I think what you describe is correct. The background color should be linked to the QR code and certificate on display only.

Also the behavior on Android and iOS should be made consistent.

One interesting side effect of the background color / gradient not being linked solely to the certificate being displayed is that if you have one mobile device loaded with a 1/2 and a 2/2 certificate, then you display the 1/2 certificate it shows with a blue background, BUT if you scan the QR code of the 1/2 certificate from the display where it is showing a blue background, scanning using a second device with no previous certificates stored, then on the second device the 1/2 certificate shows with a grey background.

This is confusing and inconsistent.

Jo-Achim commented 3 years ago

@MikeMcC399

Yes, I think that clear algorithms should already be deposited here.

However, I would like to consider the following restriction: Against the background that it should only be a question of time when a 3rd vaccination belongs to 'completeness' (a third vaccine where previously 2 vaccines belong to the "complete vaccination" or a second vaccine where previously only one vaccination leads to "completeness"), the fact should also be taken into account that a previously 'blue' certificate ((2/2) or (1/1)) might have to become 'gray' if the third / second Vaccination certificate is added.

In the future, this can be extended to other necessary vaccinations to achieve a 'complete vaccination'.

MikeMcC399 commented 3 years ago

@Jo-Achim

However, I would like to consider the following restriction: Against the background that it should only be a question of time when a 3rd vaccination belongs to 'completeness' (a third vaccine where previously 2 vaccines belong to the "complete vaccination" or a second vaccine where previously only one vaccination leads to "completeness"), the fact should also be taken into account that a previously 'blue' certificate ((2/2) or (1/1)) might have to become 'gray' if the third / second Vaccination certificate is added.

That is probably a different topic, even if it is related given the way the Android app is currently programmed. A 2/2 certificate will still be complete in its own right until it expires (currently in Germany after one year from date of vaccination - see https://www.coronawarn.app/en/faq/#eu_dcc_validity) , even if a refresher is added. The Business Rules for Germany could of course be changed over time. I haven't seen any statement yet how a refresher vaccination will be coded though.

MikeMcC399 commented 3 years ago

This issue with the changing background color of a 1/2 vaccination certificate in the detailed certificate view seems to be fixed in 2.12.0-RC0.

  1. Remove any existing certificates from the device
  2. Tap "Scan" button
  3. Scan in a 1/2 vaccination certificate
  4. Note that it is shown with a grey background
  5. Tap back arrow
  6. Tap "Scan" button
  7. Scan in a 2/2 vaccination certificate (vaccination more than 14 days ago)
  8. Note that it is shown with a blue background
  9. Tap back arrow, tap right arrow
  10. Scroll down to Vaccination 1 of 2 and tap it
  11. Note that it is shown (correctly) with a grey background
  12. Tap back arrow
  13. Tap Vaccination 2 of 2
  14. Tap three-dot symbol, tap "Remove Certificate" and tap "REMOVE"
  15. Tap Vaccination 1 of 2
  16. Note that it is still correctly shown with grey background

The background color in the overview is however not consistent for the 1/2 certificate, so I will open another issue for this with screenshots.

dsarkar commented 3 years ago

@MikeMcC399 FYI https://github.com/corona-warn-app/cwa-app-android/pull/4164

MikeMcC399 commented 3 years ago

@dsarkar

FYI #4164

Thank you! That confirms the PR #4164 "Adapt Vaccination Color + Bring Back EU Stars (EXPOSUREAPP-9076) #4164" targeted this issue as the internal IDs are the same.

I will follow up tomorrow with a new issue about the overview (I will check that it is not already fixed in the 2.13.x branch before posting).

MikeMcC399 commented 3 years ago

Follow-on issue #4200.

MikeMcC399 commented 3 years ago

This issue was fixed in tag/v2.12.0-RC0.

MikeMcC399 commented 3 years ago

This issue is verified resolved in release 2.12.1 according to the detailed steps described in https://github.com/corona-warn-app/cwa-app-android/issues/3927#issuecomment-940177489.

dsarkar commented 3 years ago

Good morning @MikeMcC399 , thanks for the feedback!