title: android camera intent not working properly on some devices
body: <p>Hi I am developing android application in which I am trying to capture image using device camera and save it to particular location. I tried it in following manner:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      Log.i("inside on create ", "inside on create ");
  
      capturePhotoForRecordUpload();
  }
  
  public void capturePhotoForRecordUpload() {
  
      Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
      if (takePictureIntent.resolveActivity(getPackageManager()) != null) {
  
          File storageDir = new File(Environment.getExternalStorageDirectory().getPath() + "/MyApp");
          if(!storageDir.exists())
              storageDir.mkdirs();
          if(!storageDir.exists())
              storageDir.mkdir();
  
              takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(Environment.getExternalStorageDirectory().getPath() + "/MyApp"+"/sample.jpg")));
              startActivityForResult(takePictureIntent, 7);
      }
  }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if (resultCode == RESULT_OK) {
      }
  
  }
  }
  </code></pre>
  
  <p>I am facing problem in above code. When I start my activity it is opening my camera. But when I click back button it again coming to on create of my activity and again opening my camera application. Is that correct behaviour or I am doing anything wrong? without calling on destroy of my activity it is again coming inside on create.Need some help. Thank you.</p>