在Android 10版上使用FingerprintAIO时崩溃的应用程序

时间:2019-12-06 07:48:50

标签: android

当我尝试验证插件FingerprintAio的指纹并立即崩溃时,我的应用程序使用了离子版本3。
请提出解决此问题的方法

代码:

  verifyKeyChain() {
    return this.faio.show({
      clientId: 'Trip Planner',
      clientSecret: 'Trip Planner',
      disableBackup: true,
      localizedReason: 'Quét Vân Tay Để Tiếp Tục.',
    }).then(success => {
      return this.getKey('privateKey');
    })
  }

代码:   this.finger.isAvailable()。then(()=> {

        this.finger.hasKey()
          .then(() => {
            this.finger.verifyKeyChain().then(fingerID => {
              this.auth.authenticate(code, fingerID, this.version).then(() => {
                this.goHome();
              }, (err) => {
                this.showSpinner = false;
              }).catch(err => {
                this.showSpinner = false;
              })
            }).catch(() => {
              this.toast.create({
                message: 'Nhận diện sinh trắc học thất bại!',
                duration: 2000
              })
              this.showSpinner = false;
            })
          })
          .catch(() => {
            this.showSpinner = false;
            const key = this.finger.generatePrivateKey();
            this.finger.setKey(key).then(() => {
              return this.auth.authenticate(code, key, this.version).then(() => {
                this.goHome();
              });
            }, (err) => {
              this.showSpinner = false;
            }).catch(err => {
              this.showSpinner = false;
            });
          })
      })

0 个答案:

没有答案