title: Android Saving a Bitmap in a Folder -Duplicates-
body: <p>My problem is whenever I save the bitmap. I saves one in the folder I want(MyFolder) and one in the DCIM/Camera. I don't see any code that makes it save int he DCIM directory?</p>
  
  <p>Here are my codes...</p>
  
  <pre><code>    case R.id.menu_save:
          try {
  
              String path = Environment.getExternalStorageDirectory()
                      .toString();
              File myNewFolder = new File(path + "/MyFolder");
              myNewFolder.mkdirs();
              OutputStream fOut = null;
              File file = new File(path, "/MyFolder/HK" + filename + ".jpg");
              fOut = new FileOutputStream(file);
  
              newBitmap.compress(Bitmap.CompressFormat.JPEG, 85, fOut);
              fOut.flush();
              fOut.close();
  
              MediaStore.Images.Media.insertImage(getContentResolver(),
                      file.getAbsolutePath(), file.getName(), file.getName());
  
              Toast.makeText(getApplicationContext(),
                      filename + "Has been saved!", Toast.LENGTH_LONG)
                      .show();
  
          } catch (Exception e) {
  
              Toast.makeText(
                      getApplicationContext(),
                      "Problem to Save the File", Toast.LENGTH_LONG).show();
          }
  
          break;
  </code></pre>