Reputation: 766
In my android app, I would like to be able to limit the maximal resolution (or size in mb) of a picture being taken.
here is how i call the camera activity :
Intent intent = new Intent( MediaStore.ACTION_IMAGE_CAPTURE );
intent.putExtra( MediaStore.EXTRA_OUTPUT, Uri.fromFile( new File( mTmpFilePath ) ) );
intent.putExtra( "filename", mTmpFilePath );
startActivityForResult( intent, REQUEST_CAMERA );
Is there anyway to force or limit the camera resolution ?
Upvotes: 4
Views: 2888
Reputation: 12367
If you start camera application with intent, you are depending on this application good will. (some implementation will support this, and some not). You can try to set up image resolution via camera class, but I found that not all advertised sizes are supported, some are ignored and some produce errors - camera applications behave differently on different devices.
Upvotes: 2