I am setting finger print scanner on expo it works fine with IOS devices but when i am working with android i tried two codes, One is working and another is not. Please help me in this.
Not working one.
class AndroidScanner extends Component {
render(){
return(
<View>
{Alert.alert('Place your finger to scan.')}
</View>
);
}
}
Expo.Fingerprint.authenticateAsync(<AndroidScanner/>).then(fingerScannerResponse => {
if (fingerScannerResponse.success) {
console.log('Finger Valid')
}else {
console.log('Finger Invalid')
}
});
Working one
Expo.Fingerprint.authenticateAsync(Alert.alert('Place your finger to scan.')).then(fingerScannerResponse => {
if (fingerScannerResponse.success) {
console.log('Finger Valid')
}else {
console.log('Finger Invalid')
}
});
Please help me with this in API they have return you can add component but same thing in class is not working… Also inform me if i have made any mistake.