set capture size for camera android -


i want set capture size camera in android. want user capture image using size alone irrespective of screen size. see approach in instagram application in android 4.x versions.

i used following code, shows camera error.

camera camera = camera.open(); parameters params = camera.getparameters(); list<camera.size> sizes = params.getsupportedpicturesizes(); params.setpicturesize(sizes.get(1).width, sizes.get(1).height);//height-480,width-640 camera.setparameters(params); 

anyone please me. in advance.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -