在我的android应用程序中,我为指纹from tutorial androidauthority.com创建了活动,并为密码创建了片段。但是我打开了片段指纹没有取消,当应用程序onPause它没有取消。取消指纹FingerprintHandler的方法:
public void stopFingerAuth() {
if (cancellationSignal == null) {
Toast.makeText(context, "Null already", Toast.LENGTH_LONG).show();
} else if (cancellationSignal != null && !cancellationSignal.isCanceled()) {
cancellationSignal.cancel();
}
}
片段内的调用方法
FingerprintHandler mFingerprintHandler = new FingerprintHandler(getActivity().getApplicationContext());
mFingerprintHandler.stopFingerAuth()