Take the tour ×  I'm making a gallery in which I load (on run
time) images from asset folder. Now I want to save image to SD
card on the click event.  For example: When the app starts, the
user see images, they can scroll through images and view them
(this part is done). The problem is pictures are loading
dynamically in my own gallery view. I have not hard coded them.
I want to save it to the SD card. But I don't have the hard
coded path of images. There can be any number of images.
private void CopyAssets() {         AssetManager assetManager =
getAssets();         InputStream in=null;     String[] files =
null;         try {             files =
assetManager.list("image");         } catch (IOException e1) {
// TODO Auto-generated catch block          for(String filename
: files) {                  try {                     in =
assetManager.open(filename);                 } catch
(IOException e1) {                     // TODO Auto-generated
catch block         try {                 String dir