isAvailable()

Use this function to determine whether scanner functionality is available.

None.

Returns true when used on a supported device, and false otherwise.

Use this function to disable or hide scan features on platforms where scanning isn’t supported. For example:

This function is also useful to avoid entering complicated logic surrounding scanning when it’s guaranteed to fail. However, it isn’t required to check before attempting a scan. Either way, your code should handle errors such as attempting a scan on an unsupported device.