Question

I have used intent to launch camera

Intent cameraIntent = new Intent( 
android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
getParent().startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST); 

and onActivityResult() used

Bitmap thumbnail = (Bitmap) data.getExtras().get("data"); 
Save_to_SD (thumbnail, filename);

But get thumbnail was small size, how do I get the full bitmap?

Was it helpful?

Solution

Save output to some uri and get it from there

Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 
                mImageCaptureUri1 = Uri.fromFile(new File(Environment.getExternalStorageDirectory(),
                        "tmp_avatar_" + String.valueOf(System.currentTimeMillis()) + ".jpg"));

                cameraIntent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri1);                     
                cameraIntent.putExtra("return-data", true);
                startActivityForResult(cameraIntent, CAMERA_REQUEST); 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top