question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Method saveImageIntoGallery() generate ".0" as file extension on Android >= 10.

See original GitHub issue

I try to use saveImageIntoGallery() to save an image to the device’s gallery, it works fine on android < 10 with a timestamp as a filename and correct extension. However, when I try on a device with android >= 10, the filename was not the timestamp anymore and the extension will be “.0” which I think came from the filename on the cache.

This problem occurred on Samsung and OPPO devices, but not on the Pixel emulators(because it appends .jpg to the saved filename)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Piasycommented, Oct 12, 2020

That sounds strange, I think adding the same image twice to the gallery should be fine, but maybe I’m wrong.

1reaction
Piasycommented, Oct 12, 2020

If you want to rename the saved image file, you can do it in ImageSaveCallback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - android - save image into gallery - Stack Overflow
I come here with the same doubt but for Xamarin for Android, I have used the Sigrist answer to do this method after...
Read more >
Access media files from shared storage | Android Developers
If scoped storage is enabled, the collection shows only the photos, videos, and audio files that your app has created. Most developers won't...
Read more >
Save a picture or other graphic as a separate file
In Outlook, the following procedure only works for photos. Right-click the illustration that you want to save as a separate image file, and...
Read more >
Android Photo App 05 save image file - YouTube
Go to http://StudyCoding.org to subscribe to the full list of courses and get source code for projects.How to build an Android app that ......
Read more >
Let's Develop an Android App to Upload Files and Images
uploadImage(): This method takes in the absolute path of the image file and generates a local file Object that is uploaded to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found