Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download images to separate directory on Android #7209

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ClementTsang
Copy link

@ClementTsang ClementTsang commented Dec 20, 2024

This PR addresses the issue on Android where all images are stored in DCIM, which people have complained about as it interferes with actual pictures for things like Google Photos. Instead, on Android, it now saves to Pictures/Bluesky, by using react-native-blob-util (https://github.com/RonRadtke/react-native-blob-util), which is a more updated fork of rn-fetch-blob.

I've only tested this on an Android emulator (Pixel 8a, Android 13) as of now, can test more if needed.

Closes: #1360

@ClementTsang
Copy link
Author

This is my first time contributing to this repo and I'm pretty rusty on my RN/Expo, so please let me know if there's anything I can fix/improve on!

@ClementTsang ClementTsang force-pushed the android_download_images_to_pictures_directory branch from e5a1192 to aca3e97 Compare December 20, 2024 10:31
@ClementTsang ClementTsang changed the title Download images to Pictures/Bluesky directory on Android Download images to separate directory on Android Dec 21, 2024
@ClementTsang ClementTsang force-pushed the android_download_images_to_pictures_directory branch from 2a89a5e to 24c4c74 Compare December 21, 2024 02:32
@gaearon
Copy link
Collaborator

gaearon commented Dec 23, 2024

Just to set expectations, this part of the code is notably finicky so we need to be careful making changes and testing. At the very least we'd need to test this against multiple real devices and a range of Android versions from 12 to 15.

@ClementTsang
Copy link
Author

ClementTsang commented Dec 23, 2024

Makes sense. Unfortunately I don't have many phones in that range, but I've tested this on my S23+ (Android 14) as well, and it works as expected. I can test more devices via emulator as well if that'll help.

@ClementTsang
Copy link
Author

Tested on the following android versions via emulator:

  • Android 12
  • Android 13
  • Android 14
  • Android 15

@LupusTheCanine
Copy link

When is this important feature getting merged?

This commit addresses the issue on Android where all images are stored
in DCIM, which people have complained about. Instead, on Android, it now
saves to `Pictures/Bluesky`, by using react-native-blob-util
(https://github.com/RonRadtke/react-native-blob-util), which is a more
updated fork of rn-fetch-blob.
@ClementTsang ClementTsang force-pushed the android_download_images_to_pictures_directory branch from 24c4c74 to 32d6d5e Compare January 21, 2025 23:29
@ClementTsang
Copy link
Author

ClementTsang commented Jan 21, 2025

Rebased to main.

Might be helpful to also get workflows running to see if there's anything I missed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save images to Bluesky folder
3 participants