I am working on one application and getting product images from the server. Currently I am saving those images into the SQLite database after converting them into byte array and at the time of use I convert them back into bitmap.
Now I have below two queries:
What is the best way to save the images in app from where we can sync them also and get when ever required.
How to assign them on image view or button because sometimes memory issue arises and application stop suddenly.
Please guide me. Any help is appreciated.
Storing app specific things on SD Card may not be the right way.. You should store images on
// it will reside in data/data/com.package.name
String path = getApplicationContext().getFilesDir() + "/";
File imagesFolder = new File(path);
imagesFolder.mkDir();
and put image files here in that folder.. So SD Card dependency can be removed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With