Commits
cristianoccazinsp authored and Sibelius Seraphini committed 612cb65f2a9
feat(android): Support to enumerate and select Camera devices (#2492) * Android only: Support to enumerate Camera devices and to select from one of them. * No need to have the camera in running state if querying for IDs. * Silly bug, not using string compare. Also, do not run any camera code if the actual camera doesn't change. * Crash fix when focus coordinates are set to null/undefined not being handled. Notes about not supported flash/focus * If a camera is not found, set the first available camera just like Camera2 does. * missing semicolon * Fixes to Camera2 API: - First change is related to camera selection by ID. Some more code was required to correctly set the facing flag and characteristics - Second change fixes a previous issue (unrelated to the PR) that was causing the preview of the camera to look upside down on rotated devices. Device rotation should not affect the display (nor set it). Device rotation should however be used for the final image (and not screen rotation). Some code was borrowed from Camera1.