title: android android.provider.MediaStore.ACTION_VIDEO_CAPTURE return null onActivityResult with nexus 7
body: <p>I am using intent for record video.</p>
  
  <p>so i use following code on recordVideo button's click</p>
  
  <pre><code>Videofilepath = "";
  Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
  startActivityForResult(intent,REQUEST_VIDEO_CAPTURED);
  </code></pre>
  
  <p>and in onActivityResult</p>
  
  <pre><code>protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  
          if (resultCode == Activity.RESULT_OK) {
              switch (requestCode) {
              case IMAGE_PICK:
                  this.imageFromGallery(resultCode, data);
                  break;
              case IMAGE_CAPTURE:
                  this.imageFromCamera(resultCode, data);
                  break;
              case REQUEST_VIDEO_CAPTURED:
                  this.videoFromCamera(resultCode, data);
  
                  break;
              default:
                  break;
              }
          }
      }
  
  
  private void videoFromCamera(int resultCode, Intent data) {
          uriVideo = data.getData();
  
  
          uploadedFileName="";
          Constant.IS_FILE_ATTACH = true;
  
          Toast.makeText(PDFActivity.this, uriVideo.getPath(), Toast.LENGTH_LONG)
          .show();
          String[] filePathColumn = { MediaStore.Video.Media.DATA };
  
          Cursor cursor = getContentResolver().query(uriVideo, filePathColumn,
                  null, null, null);
          cursor.moveToFirst();
  
          int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
          String filePath = cursor.getString(columnIndex);
          Videofilepath = filePath;
          System.out.println("Videofilepath filepath from camera : "
                  + Videofilepath);
          cursor.close();
          File f = new File(filePath);
          System.out.println("file created ? : " + f.exists());
  
          Bitmap bMap = null;
          do {
              try {
                  // Simulate network access.
                  Thread.sleep(3000);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          } while (!f.exists());
          bMap = ThumbnailUtils.createVideoThumbnail(filePath,
                  MediaStore.Video.Thumbnails.MICRO_KIND);
          do {
              try {
                  // Simulate network access.
                  Thread.sleep(1000);
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
          } while (bMap == null);
          imageOrVideo = "video";
          attachmentvalue.setImageBitmap(bMap);
      }
  </code></pre>
  
  <p>This code is working fine with samsung galaxy Tab. But not working with Nexus 7. May be Nexus 7 have front camera. 
   but i got resultant data intent is null onActivityResult.</p>
  
  <p>so in my Logcat i got the following exception :-</p>
  
  <pre><code>08-08 12:51:31.160: E/AndroidRuntime(10899): FATAL EXCEPTION: main
  08-08 12:51:31.160: E/AndroidRuntime(10899): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=200, result=-1, data=Intent {  }} to activity {com.example.activity/com.example.PDFActivity}: java.lang.NullPointerException
  </code></pre>