ministero-salute / it-dgc-verificaC19-android

VerificaC19 is the official Italian customization of the EU Digital COVID Certificate Verifier App for the Android Operating System
https://www.dgc.gov.it
Apache License 2.0
101 stars 54 forks source link

Allow compiling with SDK 24 (Android 7) #71

Closed virtualdj closed 3 years ago

virtualdj commented 3 years ago

PR to allow to use the app with Android 7, too.

NOTE: It would be great to have the app available for SDK 21 and up (Android 5.0, like the app core) but that requires lowering the zxing library version to 3.3.0 (see here) and this breaks the code.

Additionally, also KeyGenParameterSpec requires at least API 23 and has to be reworked (out of my skills).

astagi commented 3 years ago

@virtualdj could you rebase your branch with develop in order to make CI passing? Thanks!

virtualdj commented 3 years ago

@virtualdj could you rebase your branch with develop in order to make CI passing? Thanks!

It's not only a matter of rebasing, I think. The develop code has been modified and doesn't compile anymore...

astagi commented 3 years ago

@virtualdj I see these errors

> Task :app:l8DexDesugarLibDebug
Error: e: /home/runner/work/it-dgc-verificaC19-android/it-dgc-verificaC19-android/dgca-verifier-app-android/app/src/main/java/it/ministerodellasalute/verificaC19/ui/main/verification/VerificationViewModel.kt: (96, 51): Type mismatch: inferred type is ByteArray? but ByteArray was expected

Error: e: /home/runner/work/it-dgc-verificaC19-android/it-dgc-verificaC19-android/dgca-verifier-app-android/app/src/main/java/it/ministerodellasalute/verificaC19/ui/main/verification/VerificationViewModel.kt: (119, 40): Type mismatch: inferred type is ByteArray? but ByteArray was expected

and I think that realigning this code with develop branch should make CI passing.

virtualdj commented 3 years ago

Tried like so, seems to compile locally, actually.

astagi commented 3 years ago

CI finally passes, this PR is now ready for review. Thank you @virtualdj