I\'ve written a program in Java that takes in an image file and manipulates the image. Now I\'m trying to access the camera so that I can take the photo and give it to the image
There are two methods to take photo for your android application
1)Using Intent
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE); // create a file to save the image
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file name
// start the image capture Intent
startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);
2) Creating a customized camera activity. For that you need following steps
* Detect and Access Camera
* Create a Preview Class
* Build a Preview Layout
* Capture and Save Files
* Release the Camera
You may also refer the following links:
http://developer.android.com/guide/topics/media/camera.html http://developer.android.com/reference/android/hardware/Camera.html