Open m1ga opened 2 years ago
Resolves #301
hasFingerprintScanner
hasFaceScanner
hasIrisScanner
var win = Ti.UI.createWindow(); var TiIdentity = require('ti.identity'); TiIdentity.authenticationPolicy = TiIdentity.AUTHENTICATION_POLICY_BIOMETRICS; var supported = TiIdentity.isSupported(); console.log("is supported: ", supported); console.log("hasFingerprintScanner: ", TiIdentity.hasFingerprintScanner); console.log("hasFaceScanner: ", TiIdentity.hasFaceScanner); console.log("hasIrisScanner: ", TiIdentity.hasIrisScanner); if (TiIdentity.authenticationPolicy === TiIdentity.AUTHENTICATION_POLICY_BIOMETRICS) { authPhrase = 'Touch ID'; } else if (TiIdentity.authenticationPolicy === TiIdentity.AUTHENTICATION_POLICY_PASSCODE) { authPhrase = 'Device Passcode'; } Ti.API.info("AUTPHRASE: " + authPhrase); function onOpen(e) { if (!supported) { alert('Authentication is not supported on this device!'); return; } TiIdentity.authenticate({ reason: 'Can we access this content?', callback: function(e) { Ti.API.info(e); } }); } win.addEventListener("open", onOpen) win.open();
ti.identity-android-3.1.1.zip
a bit confused why I have to add the github actions again :thinking: but it thinks the master has the old actions :shrug:
After using this version, i didn't get the #301 error anymore.
Resolves #301
hasFingerprintScanner
,hasFaceScanner
andhasIrisScanner
propertiesti.identity-android-3.1.1.zip