social-app icon indicating copy to clipboard operation
social-app copied to clipboard

Gallery access to all images in local files is dependent on Android version

Open The-Peezoo opened this issue 1 year ago • 9 comments

Describe the bug When you add an image to your post on a mobile device, you can add it from a folder in your local files. On Android devices with Android version below 12, you can access all images in all folders, including folders you create yourself, but on devices with Android 12 and above, you can access only the default Android folders Camera, Screenshots, and Downloads.

To Reproduce

Steps to reproduce the behavior:

(Expected behavior with Android <12 and unexpected with Android >12).

  1. Create a post by clicking the icon at the bottom right.
  2. Then click the left icon to add an image.
  3. Then click on 'Album'.

Expected behavior

You should be able to access all images in all folders, including those you have created yourself.

Details

  • Platform: Android
  • Platform version: 9 (Works as expected),11 (Works as expected),12 (bug),13 (bug)
  • BlueSky App version: 1.51.0

The-Peezoo avatar Oct 05 '23 20:10 The-Peezoo

This appears to partially be an issue with Android itself. As someone experiencing this bug, the same issue occurs when trying to upload images to mobile sites like Facebook or Craigslist. However, on mobile websites I am given the option to tap three dots to expand the "browse" menu which lets me find the rest of my folders. On Bluesky this option does not exist. A custom media gallery for the app itself would be great, but in the interim giving us access to this "browse" window would absolutely be an acceptable solution.

h-fernand avatar Oct 09 '23 19:10 h-fernand

I suspect it's the partial photo permissions update they've rolled out in Android, and given that this is using Expo, that hasn't updated and is running in compatibility mode because it's using the READ_MEDIA_IMAGES permission instead of the new READ_MEDIA_VISUAL_USER_SELECTED permission.

I have no idea how to fix this without doing away with Expo's image picker altogether, but truly this bug makes posting images SUPER annoying.

aendra-rininsland avatar Oct 17 '23 21:10 aendra-rininsland

More reports https://www.reddit.com/r/BlueskySocial/comments/16db4lp/problem_uploading_photos

mschwendener avatar Oct 18 '23 07:10 mschwendener

I suspect it's the partial photo permissions update they've rolled out in Android, and given that this is using Expo, that hasn't updated and is running in compatibility mode because it's using the READ_MEDIA_IMAGES permission instead of the new READ_MEDIA_VISUAL_USER_SELECTED permission.

If I understand correctly, it's just one line of code that needs to be changed, right? So would it be possible to clone the repo and just fix that one line?

The-Peezoo avatar Oct 19 '23 18:10 The-Peezoo

I haven't been able to find any information about this so far, @aendra-rininsland it sounds like we need to open an issue with expo

pfrazee avatar Oct 25 '23 17:10 pfrazee

https://www.reddit.com/r/BlueskySocial/comments/17qgi6c/still_cannot_access_photos_on_my_phone

mschwendener avatar Nov 10 '23 12:11 mschwendener

@pfrazee Might be this issue: https://github.com/expo/expo/issues/25361 or this PR https://github.com/expo/expo/pull/20907

Are you using the latest version of the image picker? It seems they fixed that back in January.

Edit: Here's another, open issue discussing this; there are a bunch linked to the above PR https://github.com/expo/expo/issues/24122

aendra-rininsland avatar Dec 29 '23 17:12 aendra-rininsland

Looks like they are using PickVisualMedia instead of GetContent. Let me see if I can create a patch to get around this. A brief test let me access Browse and select an image from Files. (Give Android Studio about 40 minutes to figure itself out...)

haileyok avatar Dec 30 '23 05:12 haileyok

Good news! 🎉

haileyok avatar Dec 30 '23 06:12 haileyok