mobile_scanner icon indicating copy to clipboard operation
mobile_scanner copied to clipboard

[feature-request] Add way to check amount of available cameras on device

Open TechnicJelle opened this issue 2 years ago • 2 comments

I'm currently working on an app that will deploy to both mobile and web, so it'd be useful if there was a way to only show the Switch Camera button if there is actually another camera to switch to. My laptop only has the one, so it's not necessary to have a Switch Camera button on there, but on the app version, where most mobile phones have two, it would be useful.

TechnicJelle avatar Dec 04 '22 18:12 TechnicJelle

It would also be nice to have a (static) method to detect if the device even has any camera at all, perhaps to hide camera possibilities in the app that would be there on a device with a camera, but of course have no use on a device without.

TechnicJelle avatar Dec 13 '22 23:12 TechnicJelle

We recently implemented the availableCameras field for the MobileScannerState, however, that was only for Android devices initially. I've added this to my checklist in https://github.com/juliansteenbakker/mobile_scanner/issues/968

navaronbracke avatar Mar 05 '24 10:03 navaronbracke