okay I did like this
private Bitmap getFile(String fileName) { Bitmap file = null; try { FileInputStream fis; fis = openFileInput(fileName); file = BitmapFactory.decodeStream(fis); fis.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return file; } protected void putFile(Bitmap bitmap, String fileName){ FileOutputStream fos; try { fos = openFileOutput(fileName, Context.MODE_PRIVATE); bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos); fos.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Override protected String doInBackground(Void... params) { for (int i = 0; i < HomeActivity.globalObj.categoriesList.size(); i++) { Bitmap b; b = getFile(HomeActivity.globalObj.categoriesList.get(i).name); if (b == null) { b = getImageBitmap(HomeActivity.globalObj.categoriesList.get(i).large_image); putFile(b, HomeActivity.globalObj.categoriesList.get(i).name); } ImageView iv = new ImageView(getApplicationContext()); iv.setImageBitmap(b); imageViewList.add(iv); }