title: FileNotFoundException: /storage/emulated/0/Pictures/pic.jpg: open failed: EACCES (Permission denied)
body: <p>So I'm taking a picture and after that I'm trying to save it into to that path, but I can't access it. Tried this  <code>&lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"&gt;&lt;/uses-permission&gt;</code> and didn't work.</p>
  
  <p>This is how I'm Taking the picture and saving it.</p>
  
  <pre><code>private void takePic(View v) 
      {
          // se usa para usar algun app del phone para usar sus cosas para hacer lo que queremos envez de crearlo from scratch
          Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
  
          //guarda la imagen
          File imgFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),"pic.jpg");
  
          imgUri = Uri.fromFile(imgFile);
  
          intent.putExtra(MediaStore.EXTRA_OUTPUT, imgUri);
  
          //le dice que use el app de camare y le dice que use la camara de atras 1 = la de atras
          startActivityForResult(intent, TAKE_PICTURE);
      }
  
      //hay que hacerle override para que haga algo que no es parte del metedo.
      //Por ejemplo quiero que guarde la imagen donde yo quiera y no donde tiene por default.
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent intent)
      {
          super.onActivityResult(requestCode, resultCode, intent);
  
          //si presiono el buton de ok
          if(resultCode == Activity.RESULT_OK)
          {
              Uri selectedImg = imgUri;
  
              // te deja saber que termino de usar la imagen
              getContentResolver().notifyChange(selectedImg, null);
  
              ImageView imgV = (ImageView)findViewById(R.id.SteerinRackImgVw);
  
              // lo mismo de horita
              ContentResolver cR = getContentResolver();
  
              //tiene la data de la img
              Bitmap btMp;
  
              try 
              {
                  btMp = MediaStore.Images.Media.getBitmap(cR, selectedImg);
  
                  imgV.setImageBitmap(btMp);
  
                  //display a small popup de lo que esta pasando
                  Toast.makeText(TestMain.this,selectedImg.toString(), Toast.LENGTH_LONG).show();
              } 
  
              catch (Exception e) 
              {
                  Log.e("error", e.toString());
              }
          }
      }
  </code></pre>
  
  <p>Hopefully I didn't miss any brackets :P</p>
  
  <p>When I debug the try and catch block, the program breaks out of the try, on the 1st line.</p>
  
  <p>I hope this makes sense. English isn't my main language. Any help would be greatly appreciated. </p>