title: Android get image from internal/external storage
body: <p>I try to show my created png file in an imageView. When I start my program and click the showCreatedPng button, there is just a white blank page on emulator's screen.</p>
  
  <p>And logCat says : (Maybe Logcat shows errors because of Emulator. My emulator has 200 mb sd-card but, I can not find where is the created PNG in my computer. When I start the program my phone, PNG saved in GT-I9100\Phone folder. I guess the folder is an internal folder. Anyway, I can not see my created png file. Please help.)</p>
  
  <pre><code>05-21 21:53:39.764: E/BitmapFactory(1335): Unable to decode stream: java.io.FileNotFoundException: /mnt/sdcard/*.png: open failed: ENOENT (No such file or directory)
  </code></pre>
  
  <p>These are codes that I used.</p>
  
  <p>For saving :</p>
  
  <pre><code>private void saveImageToExternalStorage(Bitmap bitmap) {
      String qrPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/";
      try
      {
         File dir = new File(qrPath);
         if (!dir.exists()) {
            dir.mkdirs();
         }
         OutputStream fOut = null;
         File file = new File(qrPath, "QRCode.png");
         if(file.exists()){
            file.delete();
            file.createNewFile();
            fOut = new FileOutputStream(file);
            bitmap.compress(Bitmap.CompressFormat.PNG, 100, fOut);
            fOut.flush();
            fOut.close();
         }
      }
      catch (Exception e) {
        Log.e("saveToExternalStorage()", e.getMessage());
      }
  }
  </code></pre>
  
  <p>And codes for get png file :</p>
  
  <pre><code> String qrPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/*.png";
   BitmapFactory.Options options = new BitmapFactory.Options();
   options.inPreferredConfig = Bitmap.Config.ARGB_8888;
   Bitmap mustOpen = BitmapFactory.decodeFile(qrPath, options);
  
   setContentView(R.layout.qr_image);
   ImageView imageView = (ImageView) findViewById(R.id.qr_image);
   imageView.setImageBitmap(mustOpen);
  </code></pre>
  
  <p>Thanks for your help.</p>