-3

I want to take photo and display it in image view with delete button in image view if i dont want the photo and take another photo and send the photo taking via MMS.

iRuth
  • 2,737
  • 3
  • 27
  • 32
  • You could check the answer to this [question](http://stackoverflow.com/q/5991319/2688283). You should also refer to [android's documentation](http://developer.android.com/training/camera/photobasics.html). – iRuth Feb 10 '15 at 03:45

1 Answers1

0

Declaring Button and ImageView

ImageView imageView= (ImageView)this.findViewById(R.id.imageView1);
Button photoButton = (Button) this.findViewById(R.id.button1);

Button OnCLick to Capture an Image

 photoButton.setOnClickListener(new View.OnClickListener() {
       public void onClick(View v) {
                Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
                startActivityForResult(cameraIntent, CAMERA_REQUEST); 
            }
        });

Place the Captured Image Into ImageView

protected void onActivityResult(int requestCode, int resultCode, Intent data) {  
        if (requestCode == CAMERA_REQUEST && resultCode == RESULT_OK) {  
            Bitmap photo = (Bitmap) data.getExtras().get("data"); 
            imageView.setImageBitmap(photo);
        }  
    }

Required to add in Manifest File

<uses-feature android:name="android.hardware.camera"></uses-feature> 

I am Not Much aware sending that image MMS

For More Reference

How to send image via MMS in Android?

Community
  • 1
  • 1
mdsaleem1804
  • 110
  • 14