title: Camera intent video can't be played from sd card
body: <p>I'm launching the camera app in my application and record a video. After recording i'm saving it also on the sd card. the problem is that the video in the gallery can be played and the one on the sd card can't be played. </p>
  
  <pre><code>private void recordVideo() {
  
    Intent intent = new Intent("android.media.action.VIDEO_CAPTURE");          
    startActivityForResult(intent, CAMERA_VID_REQUEST);     
  
  } 
  
  
  protected void onActivityResult(int requestCode, int resultCode, Intent data){  
  
      super.onActivityResult(requestCode, resultCode, data);        
      if ( requestCode == CAMERA_VID_REQUEST &amp;&amp; resultCode == Activity.RESULT_OK) {             
  
               try {          
                   AssetFileDescriptor videoAsset = getContentResolver().openAssetFileDescriptor(data.getData(), "r");          
                   FileInputStream fis = videoAsset.createInputStream();
                   File videoFile = new File(Environment.getExternalStorageDirectory().getPath()+"/test.mp4");   
                   FileOutputStream fos = new FileOutputStream(videoFile); 
                   byte[] buffer = new byte[1024];          
                   int length;          
  
  
  
                   while ((length = fis.read(buffer)) &gt; 0) {                
                       fos.write(buffer, 0, length); 
                   }                 
  
                   fis.close();          
                   fos.close();                        
  
  
               } catch (IOException e) {  
  
                   // TODO: handle error           
               }
          }
  </code></pre>
  
  <p>Tried on two different devices.
  Any solution that help to solve this issue?</p>