I've been trying to write an application that uses the Camera App to take a picture. So far, the only thing I've been able to get back successfully is a tiny bitmap picture. I've found several other posts related to this topic that have code that is reported to work, but it does not work for me. I'm hoping someone can steer me in the right direction.
Below is the code I am using currently, but it causes the application to blow up. private void takePicture(final int x, final int y, String description) { // create a file on the SD card File file = new File(Environment.getExternalStorageDirectory(), "tmp_" + String.valueOf(System.currentTimeMillis()) + ".jpg"); // Create the URI that tells the camera where to put the picture. mOutputFileUri = Uri.fromFile(file); statusLine.setText("URI => " + mOutputFileUri); mIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE) .putExtra(MediaStore.EXTRA_OUTPUT, mOutputFileUri) .putExtra(PIC_X, x) // x coordinate of square .putExtra(PIC_Y, y) // y coordinate of square .putExtra(PIC_DESCRIP,description) .putExtra("return-data", true) ; startActivityForResult(mIntent, PIC_FROM_CAMERA); } Ultimately, I want to be able to get the picture back and do two things with it: create a 64x64 icon that is displayed by the Android application, and upload the picture to a web application. Thank you for any help or advice you can give. Oh, btw, I'm running this on the emulator using Android 2.0 Thanks, Ray
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en