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

File extension lost #148

Open
fm-sys opened this issue Jul 27, 2024 · 3 comments
Open

File extension lost #148

fm-sys opened this issue Jul 27, 2024 · 3 comments

Comments

@fm-sys
Copy link

fm-sys commented Jul 27, 2024

Library version: 1.5.6
OS version: Android 14
Device model: Pixel 7a

Describe the bug
Hi, I have an issue with your library. The file extension is lost when creating a file in the Downloads folder.

Do you know a workaround for it?

To Reproduce

All this doesn't work...

FileDescription description = new FileDescription("test.gpx", "", "");
DocumentFileCompat.createDownloadWithMediaStoreFallback(getApplicationContext(), description);
FileDescription description = new FileDescription("test.gpx", "", null);
DocumentFileCompat.createDownloadWithMediaStoreFallback(getApplicationContext(), description);
FileDescription description = new FileDescription("test.gpx", "", "application/gpx+xml");
DocumentFileCompat.createDownloadWithMediaStoreFallback(getApplicationContext(), description);

however, this does work:

FileDescription description = new FileDescription("test.png", "", "image/png");
DocumentFileCompat.createDownloadWithMediaStoreFallback(getApplicationContext(), description);

grafik


Reference
fm-sys/snapdrop-android#309

@fm-sys
Copy link
Author

fm-sys commented Jul 30, 2024

@anggrayudi any idea? Thank you!

@anggrayudi
Copy link
Owner

Does this only happen on Android 14?

@fm-sys
Copy link
Author

fm-sys commented Jul 30, 2024

At least Android 13 is affected as well, didn't have checked other versions until now though.

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

No branches or pull requests

2 participants