onActivityResult doesn't work for Camera -Tab ActivityGrup
<p>I want to capture image &amp; save it to SD card. Now its working fine. 
My problem is 1) after capture  <code>OK  and Cancel</code> button are avialble.When I click Ok only it need to save the image into SD card.</p>

<p>2) It doesn't come to <code>onActivityResult</code> method. I have written my <code>onActivityResult</code> inside the <code>ActivityGroup</code> class.</p>

<p>This code for When User click on Camera button, it will open cameara &amp; save it</p>

<pre><code>       //Camera
    Button btnCamera =(Button)findViewById(R.id.btnCamera);
    btnCamera.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
             selectedImagePath = Environment.getExternalStorageDirectory()+"/"+retailerCode+"-"+count+".jpg";
             imgName =retailerCode+"-"+count+".jpg";
             count++;
             File file = new File(selectedImagePath);
             Uri outputFileUri = Uri.fromFile(file);
             Intent intent = new Intent (android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
             Bundle b = new Bundle();
             b.putString("Activity", "RetailerOrderSActivity");
             b.putString("RetailerName", seletctedRetailer);
             b.putString("RetailerCode", retailerCode);
             intent.putExtras(b);
             intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
             startActivityForResult(intent, CAMERA_PIC_REQUEST);
             onPhotoTaken();


        }
    });

    protected void onPhotoTaken() {
         _taken = true;
         DBAdapter dbAdapter = DBAdapter.getDBAdapterInstance(CameraMainActivity.this);
         dbAdapter.openDataBase();
         boolean status = dbAdapter.saveImageInfo(retailerCode,strExecutive,strBusinessUnit,strTerritoryCode,imgName,visitNumber);
         if(status) {
          Toast.makeText(SalesActivityGroup.group.getApplicationContext(), "Image has been saved successfully" , Toast.LENGTH_SHORT).show();
         }else {
           Toast.makeText(SalesActivityGroup.group.getApplicationContext(), "Image has not been saved successfully" , Toast.LENGTH_SHORT).show();
         }
        dbAdapter.close();
        lstCaptures = getAllImage(imgDateVal.getText().toString());
        imageViewTable.removeAllViews();
        loadTableLayout();  
     }
</code></pre>

<p>This is code for ActivityGroup</p>

<pre><code>      public class SalesActivityGroup extends ActivityGroup {
          @Override
          protected void onActivityResult(int requestCode, int resultCode, Intent data) {
       System.out.println("===REQUEST=====" +requestCode);
         System.out.println("==resultCode==" +resultCode); } }
</code></pre>

<p>Actually I need to call <code>onPhotoTaken</code>  from <code>onActivityResult</code>. According current my code if the user click cancel also, it saving information to DB. Image is not captured..</p>

<p>This is my app image : </p>

<p><img src="http://i.stack.imgur.com/gIhAm.png" alt="enter image description here"></p>

<p>This is button showing after capture image: </p>

<p><img src="http://i.stack.imgur.com/Qyf7g.png" alt="enter image description here">
Please anybody sort out this issue..</p>

<p>Thanks in advance</p>
