Remove previously taken images from gallery

1. What is the general goal of the feature?

Remove photos taken for image questions from the device's image browser. At the moment, this can be done only upon submission. This means that if a user creates several draft survey instances, each with a photo, all previously taken photos are visible in the image browser.

This is a problem because 1) data privacy (photos are visible in various apps) and 2) users may accidentally link a previously taken photo to the wrong survey instance.

2. What are some example use cases for this feature?

  • As a coordinator for a large humanitarian NGO conducting beneficiary registration, I want to make sure my team members never accidentally use a photo in two different submissions while working on several drafts in order for us to avoid false records.

  • As the data privacy officer at my organization I want to make sure beneficiary ID photos are never visible in the camera roll / gallery of our local team's devices to avoid putting them and affected people at risk.

3. What can you contribute to making this feature a reality?

  • Funding :slight_smile:
  • UX flow, UI designs
  • User testing

I believe that @yanokwa and @Tino_Kreutzer have already discussed this privately but I wanted to give a public response so others who might be interested can chime in.

Is it ever desirable for pictures taken within the context of an ODK Collect form to be available from other applications? Using a setting has the advantage of leaving behavior the same for existing users but if it's never desirable it might make sense to change the default behavior.

Confusingly enough, there are different ways that media currently is made available outside of Collect:

  • Pre-migration away from /sdcard/odk, Android will identify all media files saved to the Collect instance folder and register them with the Android Media Store. This will go away after the migration is forced in v1.29.
  • Collect explicitly registers media files with the Android Media Store. I didn't realize this was the case and the comment says it's "so that the viewing is fast in Android 2.0+". It's not explicit but I'm guessing that the registration was done just for performance reasons and not because users wanted access to the files outside of Collect. I also imagine that either there's no longer a performance difference or even if there is it doesn't matter because devices are so much faster.
  • Collect launches a camera app on the device to take a picture. Some camera apps will only hand the media back to Collect but others will also save a copy in their own folder (e.g. a DCIM folder).

The second point is straightforward enough to take care of with or without a setting but the last one is much harder because camera apps are inconsistent in where they save images and how they name them. I'm not sure whether this is something most camera apps do or not (please comment if you know). It would be important to figure out whether doing something about that is necessary because that changes the scope a lot. To see whether your device does this, take a picture from Collect, then open an image browser/viewer app. On my Samsung Galaxy Tab A, for example, I see the image I just took twice. If I look at the image details, I see that one is in the ODK instance folder and the other is in the DCIM folder.

@LN Thanks for looking into this.

the last one is much harder because camera apps are inconsistent in where they save images and how they name them.

I would say for the purpose of this use case it's OK to expect end users to use one of a list of apps that is confirmed to work with this setting.

Is it ever desirable for pictures taken within the context of an ODK Collect form to be available from other applications? Using a setting has the advantage of leaving behavior the same for existing users but if it's never desirable it might make sense to change the default behavior.

I would say yes, e.g. for backup or usability purposes. It's nice in some contexts to have the image not just uploaded with the submission but also archive it in a service like Dropbox or Google Photos.

ODK Collect v1.29 is now in beta and it no longer registers media attached to form instances in device-wide galleries. We believe this is the best behavior for most contexts and matches most modern apps that are not dedicated to media capture.

We explored this a bit and as far as I can tell, the prior behavior would not have automatically helped with this. That is, you'd still need to e.g. open the Dropbox app, select images that had been captured with Collect, and add them to a Dropbox folder. My recommendation for that kind of need would be to use the device camera app to capture images and then browse to select them from Collect. We can include this in documentation as well.

We're very interested in hearing from anyone who might have a workflow that interacts with this change.

@LN We used Dropsync to automatically store a backup of images to Dropbox without needing to manually upload them. It's an edge use case and I'm not sure for how long this will be supported given that Android is locking things down. So I don't expect this would have to be supported going forward.

But I'd also be interested in other users who may depend on having their photos/media available outside Collect as you described...

2 Likes

There's an ODK Collect v1.29 beta out now which no longer registers media with the Android Media Store. On some Android versions, file browser apps will still have access to the media files captured from Collect. However, those files should not be available when later browsing to select media from Collect. I think this is a really good change in line with other updates to how Collect data is stored so thanks for bringing this up, @Tino_Kreutzer.

If you think this behavior change could affect you, please try out the beta and give us feedback!

1 Like