im developing an app that allows users to take a picture and then it does some work on it in the background, however i have run into a problem i have hard coded the picture size into it and it is causing errors on a different phone to the one i am using and im assuming its down to the phone not supporting the camera size i have hard coded.
i have read on here about it but the answers are to vague all people keep saying is to use the getSupportedSizes method but i just dont know what to do with it after that.
any help would be greatly appreciated.
It’s important to use this method because the cameras on the different devices support very different resolutions, so, you’ll have to specify what resolution you want out of the ones that are available on the given device.
Pseudo….
Usually the thing that matters most is the photo’s aspect ratio. So, you’ll want to compare the w/h to 16:9 or 4:3 and then find the highest (or second highest) quality at the supported ratio. Obviously, I don’t know what your needs are so you’ll have to determine what sizes actually meet your given criteria. If you simply want the highest quality and you don’t care about the aspect ratio you’ll usually find that as the last item in the list of sizes.