title: Save video to Internal Storage
body: <p>I have a videoView that plays an video from a path that corresponds to a video file within the android gallery</p>
  
  <pre><code> VideoView videoView1 = (VideoView)promptsView.findViewById(R.id.videoView09);
              String SrcPath = "/storage/emulated/0/DCIM/Camera/20150824_210148.mp4";
              videoView1.setVideoPath(SrcPath);
              videoView1.requestFocus();
              videoView1.start();
  </code></pre>
  
  <p>Now, i need  to somehow store the video from this videoView to the internal storage for my app privately.</p>
  
  <p>I've managed to do this for photos using     </p>
  
  <pre><code>public String saveImageToInternalStorage(Bitmap image, String imgRequestedName) {
      ContextWrapper cw = new ContextWrapper(getActivity());
      File directory = cw.getDir("imageDir", Context.MODE_PRIVATE);
      File mypath=new File(directory,imgRequestedName+".jpg");
      String loc = mypath.getAbsolutePath();
      FileOutputStream fos = null;
      try {
  
          fos = new FileOutputStream(mypath);
          image.compress(Bitmap.CompressFormat.JPEG, 70, fos);
          SharedPreferences pref = getActivity().getApplicationContext().getSharedPreferences("MyPref", Context.MODE_PRIVATE);
          final SharedPreferences.Editor editor = pref.edit();
          editor.putInt("totalImageCount",(pref.getInt("totalImageCount",0))+1);
          editor.commit();
  
          fos.close();
      } catch (Exception e) {
          e.printStackTrace();
      }
  
      return mypath.getAbsolutePath();
  }
  </code></pre>
  
  <p>How can i do the equivalent for videos?</p>
  
  <p>and how can i read the video from the internal storage? </p>