Last active
September 19, 2018 04:28
-
-
Save adhithiravi/d23f0ac58f7e10c8dd7a25f839c8eed9 to your computer and use it in GitHub Desktop.
Show an example usage of isSupported()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clickHandler() { | |
TouchID.isSupported() | |
.then(biometryType => { | |
// Success code | |
if (biometryType === 'FaceID') { | |
console.log('FaceID is supported.'); | |
} else if (biometryType === 'TouchID'){ | |
console.log('TouchID is supported.'); | |
} else if (biometryType === true) { | |
// Touch ID is supported on Android | |
} | |
}) | |
.catch(error => { | |
// Failure code if the user's device does not have touchID or faceID enabled | |
console.log(error); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment