I follow this guide: http://mobile.tutsplus.com/tutorials/android/capture-and-crop-an-image-with-the-device-camera/
I am trying to create a simple operation that has a “ take picture ” Button and ImageView , and just take a picture, and then open the crop operation built into Android. However, I can open the camera without incident, however, taking a photo, the code does not send the photo to the cropping operation.
It seems to crash when a cropping operation is called. I am not sure why this is happening; I followed the example exactly (except for the XML source material, which I don't need), and I looked through the code and everything seems to make sense. I am sure this is a small mistake that causes this. Here is my activity code:
package com.example.project; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.ImageView; import android.widget.Toast; public class ImageChoose extends Activity implements OnClickListener {
source share