I tried available pub packages (image gallery saver and gallery saver) to try to save images/videos to gallery but it does not work on android 11/12/13.
If i save the image in getApplicationDocumentsDirectory() given by path provider, the image does not show in the gallery.
I tried all possible solution given in this stackoverflow.
How do i solve it?
i expect to save image and show it to its gallery.
I tried available pub packages (image gallery saver and gallery saver) to try to save images/videos to gallery but it does not work on android 11/12/13.
If i save the image in getApplicationDocumentsDirectory() given by path provider, the image does not show in the gallery.
I tried all possible solution given in this stackoverflow.
How do i solve it?
i expect to save image and show it to its gallery.
Related
The device is Samsung Galaxy III. I developed an APP to run the camera activity and capture an image. After analyzing the image, I print out some text information. Right now every captured image is saved at gallery. I don't need the image to be saved in gallery or SD card. I think either of the following two solutions will work for me, but I don't know how to program it:
avoid saving pictures to gallery.
delete the picture somewhere in the APP.
Any comments are appreciated.
Read Android Camera tutorial.
...
Storage - Are the images or videos your application generates intended to be only visible to your application or shared so that other applications such as Gallery or other media and social apps can use them? Do you want the pictures and videos to be available even if your application is uninstalled? Check out the Saving Media Files section to see how to implement these options.
or see this one: How to save image captured with camera in specific folder.
In the Camera intent when starting, add this:
intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(getTempFile(context)));
I solved my problem with following two steps:
as '#auselen' pointed, save all the images to a specific folder. How to save image captured with camera in specific folder.
delete all the images in that folder somewhere in the APP. How to Delete Image From SDCard in Android
use this for delete a pic
ImgPhoto1.setImageBitmap(null);
i've got a question about best solution for caching downloaded images. From internet are downloaded URLs of images i want to show with specifig tag. On some other activities will be showed previews of images and after click on preview will be shown image in full size and his description. My idea is save info about image to database with path to directory named after tag in cache directory. When preview should be shown, i look to cache and if there image is, good and if not image will be downloaded
Maybe use a naming convention so you won't need to use the database ?
Like this :
Profil picture for user 1 will be in
tmp/mypackage/pic_cache/user_pic_1.jpg
I am working on an application in which I have to show the preview of image attachments, I have online path of the images. How can I show the preview of the image from that path in android application?
If you want to have images, you have to hit the server to get them. What I suggest to run AsyncTask and get that image and show it as you want.
Android how to save image in Gallery? and what's difference between save image to gallery or in sdcard Please Explain ....
You can not really save an image file into the gallery.The gallery is a native android app designed to show the image and video files on the SD card. However,when you save some media files into SD card, you can notify the mediascanservice to update the database of the gallery so that these files will be shown in gallery (by default ,not shown ).
see here:http://developer.android.com/reference/android/media/MediaScannerConnection.html
Is there some possible way of picking images from picture folder?
Basically you call the gallery intent and expect a result with onActivityForResult
Have a look here:
How to pick an image from gallery (SD Card) for my app?
Further searching in SO yields this, a complete solution:
Get/pick an image from Android's built-in Gallery app programmatically