title: Setting resolution of the image taken by a camera
body: <p>In my application, I am taking an image through the inbuilt camera activity and storing it in the SD card. I am using intent.putextras to get a high resoltuion image.</p>
  
  <p>1st device- The code works successfully and I get an image of resolution of 640X480.</p>
  
  <p>2nd device- When the built in camera activity asks for saving the image captured, it force closes. But when i explicitly change the device's camera resolution to 640X480 and re-run the application, it works perfectly fine.</p>
  
  <p>Questions:-</p>
  
  <ol>
  <li>Methods to overcome this ??</li>
  <li>Can this be an android version related problem. The android version of the two devices is different.</li>
  <li>Is thera a way of passing the resolution parameters(640,480) to the built in camera activity?? Or a self made camera activity is necessary??</li>
  </ol>
  
  <p>Here goes the code</p>
  
  <pre><code>public void onClick(View v) {
      // TODO Auto-generated method stub
  
      if(v.getId()!=1000){
          imageFile = "bmp"+v.getId()+".png";
  
          File f = new File (folder,imageFile);
           imageUri = Uri.fromFile(f);
          Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
          i.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, imageUri);
          startActivityForResult(i,CAMERA_PIC_REQUEST);   
      }
      if(v.getId()==1000){
          Intent openFinalShow = new Intent("com.integrated.mpr.FINALSHOW");
          startActivity(openFinalShow);
          finish();
      }
  
  }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      // TODO Auto-generated method stub
  
      super.onActivityResult(requestCode, resultCode, data);
      if(resultCode == RESULT_OK){
              return;
      }
  }
  </code></pre>