isAvailable()

Use this function to determine whether BiometricsService functionality is available.

Syntax 

1import { getBiometricsService } from 'lightning/mobileCapabilities';
2isAvailable(): Boolean

Parameters 

None.

Returns 

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

Usage 

1handleVerifyClick(event) {
2    const myBiometricsService = getBiometricsService();
3    if(myBiometricsService.isAvailable()) {
4        // Perform biometrics service operations
5    }
6    else {
7        // BiometricsService not available or consuming app hasn’t implemented it.
8        // Handle with message, error, beep, and so on
9    }
10}

See Also