Open Android Camera in lower resolution with ACTION_IMAGE_CAPTURE

16,484

Solution 1

Unfortunately there is no way you can do this. Once a different application is lauched the settings of that app can only be changed by the user using the application.

It would be disastrous to allow other apps to change the settings of an app.

So you have two options now -

  • Build you own camera activity and take pictures in the resolution that you want
  • Tell the user to take pictures only at the resolution that you specidy, basically ask the user to change the camera resolution to the one you want in the camera application before he takes a picture..

Solution 2

This option is available only for video capturing, using this lines

intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1); // high quality
startActivityForResult()

For our disasapoitment "MediaStore" don`t have parameter for EXTRA_IMAGE_QUALITY

Share:
16,484
cagryInside
Author by

cagryInside

Updated on June 15, 2022

Comments

  • cagryInside
    cagryInside almost 2 years

    I am opening android camera using intent like this :

        Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
    
        cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, mCapturedImageURI);  
        startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);
    

    But camera always opens 6mp resolution (i think its devices max camera resolution) i want to open it lower resolution like 2mp. Is there anyway to do this

    Thanks for any advice.