This PR brings a lot of changes and must be heavily tested. There should not be breaking changes, but since the CameraX API is quite different from Camera2, there might be some differences.
iOS could not be tested as I don't have a physical iOS device.
Should we capture the GPS position before taking the picture (as done now)? It adds some delay to the actual image capture
ImageAnalysis
ImageAnalysis resolution is hardcoded. I'd like to give users the option to choose it, but I am not sure if this is available on iPhone. Any idea @dim-apparence ?
An example using the ImageAnalysis could be nice (decoding barcodes?)
ImageAnalysis does not rotate the picture (but since we get the orientation on the client side, it could be up to them to do it). It seemed to not be rotated on master.
Sized preview
Camera preview size seems to be stretched to the screen size. On my screen for instance, the higher camera resolution I get is 1600x1200. I asked for a resolution of 3000x3000 (and pictures taken are with this resolution). This implies that the preview I get in response is of a different aspect ratio than what I asked.
Sometimes the transition between full screen and sized preview does not work very well in the example app.
Focus
Focus on a specific point is not that hard to do with CameraX. The code to do it is included but the UX part is not done. iOS is not done neither.
Description
This PR intends to migrate the app to CameraX among other improvements to the Android platform, including:
Checklist
Before creating any Pull Request, confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).flutter analyze
without any issues.Breaking Change
This PR brings a lot of changes and must be heavily tested. There should not be breaking changes, but since the CameraX API is quite different from Camera2, there might be some differences. iOS could not be tested as I don't have a physical iOS device.