2

Android has recently released a new Photo Picker for Android that provides a safe, built-in way for users to grant an app access to only selected images and videos instead of their entire media library.

This photo picker, however, strips off location tags from EXIF metadata, as reported on the Google Issue tracker: https://issuetracker.google.com/issues/243294058

Even though Android has released it for devices running Android 12 and below too, it is not enabled yet on many devices. I want to detect if it is enabled on a device or not, so that I could predict possible loss of EXIF metadata and warn my app users about it.

I tried using the isPhotoPickerAvailable() function, but it probably returns true on devices that are officially supported, even though the photo picker is not enabled.

I know a bit about picker_intent_enabled but could not find a public getter function or API call that tells about the state of the photo picker on a device.

EDIT:

I discovered that even when picker_intent_enabled is true, take_over_get_content determines if the new Photo Picker will be launched on a device when ACTION_GET_CONTENT is used. The value of take_over_get_content is set as true by default on some devices, while others still have it as false for the same Android version. But again, I could not find a way to retrieve its value.

Is there a way to predict if EXIF metadata would be stripped off on a device?

  • 1
    `way to predict if EXIF metadata would be stripped off on a device?` Not the device but the used provider strips. – blackapps Jun 12 '23 at 11:22
  • Thanks for pointing out! I've edited the description to include how this is still specific to some devices as users aren't turning the new provider on by themselves. Unlike `ACTION_GET_CONTENT`, `ACTION_OPEN_DOCUMENT` opens the file picker but does not list all the document providers (like gallery apps) on a device. Is there any other provider too that we may use? – Ritika Pahwa Jun 14 '23 at 09:29

0 Answers0