我想为安卓实现指纹传感器验证功能。所以我实现了这个Java函数,它被另一个调用:
public boolean checkSensor (){
Context context=this.cordova.getActivity().getApplicationContext();
FingerprintManager fingerprintManager = (FingerprintManager) context.getSystemService(Context.FINGERPRINT_SERVICE);
// runs like a charm
boolean abc = fingerprintManager.isHardwareDetected();
// doesn't reach this step. function is terminated with error
return abc;
}
有什么建议吗?