Reputation: 1
I want to do this : I choose a resolution next I set the closest resolution and take a photo , but I don't know how I get a list of resolution and set a resolution. I take a photo just like this :
private void clickpic() {
// Check Camera
if (getApplicationContext().getPackageManager().hasSystemFeature(
PackageManager.FEATURE_CAMERA)) {
// Open default camera
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);
// start the image capture Intent
startActivityForResult(intent, REQUEST_CAMERA);
} else {
Toast.makeText(getApplication(), R.string.no_camera, Toast.LENGTH_LONG).show();
}
}
Upvotes: 0
Views: 264
Reputation: 1006574
ACTION_IMAGE_CAPTURE
does not grant you control over the resolution. The closest thing that it does is let you choose between a full-size image (provided if you supply EXTRA_OUTPUT
) or a thumbnail (provided if you do not supply EXTRA_OUTPUT
).
Upvotes: 2