title: Save Capture Image in SD card android
body: <p>I call camera intent and try to save capture image in sd card.but camera intent give me null data.what is the problem i can't understood.my code is as follow</p>
  
  <pre><code>imgBtnPicture.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View v) {
  
              String fileName="ashraful.jpg";
  
              String root = Environment.getExternalStorageDirectory().toString();
              new File(root + "/photofolder").mkdirs();
              File outputfile=new File(root+"/photofolder/", fileName);
              Uri outputFileUri = Uri.fromFile(outputfile);
              Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
              cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
              startActivityForResult(cameraIntent, CAMERA_REQUEST); 
          }
      }); 
  
  
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data); 
      if (requestCode == CAMERA_REQUEST &amp;&amp; resultCode == RESULT_OK) { 
  
          if(data!=null)
          {
              Bitmap photo = (Bitmap) data.getExtras().get("data");
              Bitmap icon1=ResizeBitmap(photo,200,200);
              imgBtnPicture.setImageBitmap(icon1);
          }
      }  
  }
  </code></pre>
  
  <p>but i get null data? how to solve my problem?plz help</p>