title: NullPointerException when calling data.getData inside OnActivityResult()?
body: <p>I'm trying to display the path of a saved picture taken by the camera, by calling </p>
  
  <pre><code>`data.getdata` 
  </code></pre>
  
  <p>inside a Toast, but the App crashs. I also tried <code>data.getDataString</code> but it did not solve </p>
  
  <p>any thing.</p>
  
  <p>Code:</p>
  
  <pre><code>@Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
              Intent imageIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
              File imagesFolder = new File(Environment.getExternalStorageDirectory(), "My Images");
              imagesFolder.mkdirs();
              File image = new File(imagesFolder, "img01");
              Uri uriSavedImage = Uri.fromFile(image);
              imageIntent.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);
              startActivityForResult(imageIntent,CAMERA_REQUEST_CODE);
          }
      });
  }
  
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      if ((requestCode == CAMERA_REQUEST_CODE) &amp;&amp; (resultCode == RESULT_OK)) {
          Toast.makeText(getApplicationContext(), "Image Saved To: "+data.getData(), Toast.LENGTH_SHORT).show();
      }
  </code></pre>