akvo/akvo-caddisfly

Error getting images for some tests on Android 10

valllllll2000 opened this issue · 2 comments

Steps to reproduce

You need an Android 10 Device
Create a flow form with a caddisfly question, chose: Water / E.coli / Aquagenx CBT Microbiology / US EPA...
Try filling/submitting the form by taking a random picture. You will see that the image is never displayed in the square

Expected behaviour

Image view loads correctly

The temporary solution has been to add a flag as described here
captain-miao/AndroidException#7

But for the future a proper fix would require to use the scoped storage properly:
https://developer.android.com/training/data-storage#scoped-storage

We need to take into account that this file is shared with Flow

There have been a temporary fix but this issue needs to be addressed both on flow and Caddisfly
Currently we target api 29 in both flow and caddisfly apps. We need to update to target api 30 as eventually new/existing apps will only be admitted on play store if they target 30 (for now 29 is ok). We need to move the files to app specific folder and make sure when they are shared with Flow they can be read. This docuementation can be used https://developer.android.com/training/data-storage/shared/documents-files