I am using Intents to open the camera and take images from it. but the image gets pixelated. Is there any proper way of taking high-resolution images and saving them to the gallery?
Here is my Intent code
if (options[item].equals("Take Photo")) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
startActivityForResult(intent, 1);
} else if (options[item].equals("Choose from Gallery")) {
Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
startActivityForResult(intent, 2);
} else if (options[item].equals("Cancel")) {
dialog.dismiss();
}
Here is my onActivityResult Code
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
if (requestCode == 1) {
//TODO: Work on Camera picture
button = false;
sharetest.setText("Share");
Intent i = new Intent(Intent.ACTION_VIEW);
Bitmap captureImage = (Bitmap) data.getExtras().get("data");