科尔多瓦插件指纹多合一

时间:2019-04-07 00:42:21

标签: javascript cordova plugins cordova-plugins fingerprint

我正在使用“指纹多合一”功能,但我不知道如何获取已注册的指纹。如何获取已经注册的指纹?

https://github.com/mjwheatley/cordova-plugin-android-fingerprint-auth

document.addEventListener('deviceready', Pronto, false);

function Pronto() {
  alert("Carregado!");
  Fingerprint.isAvailable(isAvailableSuccess, isAvailableError);

  function isAvailableSuccess() {
    document.querySelector(".btn_finger").style.display = "block"
  }

  function isAvailableError(message) {
    alert(message);
  }
}

document.querySelector(".btn_finger").addEventListener("click", pronto1);

function pronto1() {
  Fingerprint.show({
    clientId: 'Fingerprint-Demo',
    clientSecret: 'password', //Only necessary for Android
    disableBackup: true, //Only for Android(optional)
  }, successCallback, errorCallback);

  function successCallback(result) {
    alert("Cadastrado");
  }

  function errorCallback(err) {
    alert("Authentication invalid " + err);
  };
}

alert(fingerid);

0 个答案:

没有答案