I am trying to capture image from camera but it come out to be blur. Below is the code that I am using.
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent, CAMERA_REQUEST);
Bitmap thumbnail = (Bitmap) data.getExtras().get("data");
mPhotoEditorView.getSource().setImageBitmap(thumbnail);
Above method only provides thumbnail.
To save the full-size Photo you should follow this tutorial.
Add this permission in your manifest.
Create a File. In this, we will save the image:
Now, you can invoke capture Intent like this:
Add
FileProviderin your Manifest fileCreate res/xml/file_paths.xml file with the following content:
Here you go, you have saved a full-size image to the file you had created.
Bonus: You should always scale your image before using it in an ImageView, this will help you optimize your app's Memory usage.