Definitely an edge case, but we have a crash in Sentry where the QR scanner was invoked on a device without a camera (Nova Pro e-Reader?): https://sentry.prod.mozaws.net/operations/firefox-nightly/issues/5874872/
We have added a clearer exception for this in A-C and a utility method to check whether or not a camera is available (context.hasCamera()
).
May be best to disable the corresponding menu items in this case, or show some other indication that the feature is not available?
@csadilek We don't have any devices without a camera around here to test on, is it possible for you to test this?
I suspect our only way forward here is to use a VM with the camera set to disabled.
That is true. On these virtual devices: Nexus 5 (API 27), Galaxy Nexus (API 23), Nexus 6P (API 24) I was able to see that the Scan option is hidden when there is no camera enabled.
Most helpful comment
That is true. On these virtual devices: Nexus 5 (API 27), Galaxy Nexus (API 23), Nexus 6P (API 24) I was able to see that the Scan option is hidden when there is no camera enabled.