public void OnOpenFingerprintReader(BiometricsResultCode resultCode, string hint) { /* If hint is valid, display it. */ if (null != hint && hint.Length != 0) { mStatusTextView.Text = hint; } if (BiometricsResultCode.Ok == resultCode) { /* Now that sensor is open, if user presses "mOpenCloseButton" fingerprint * sensor should now close. To achieve this we change flag which controls * what action mOpenCloseButton takes. */ mOpenFingerprint = false; /* If fingerprint opened then we change button to say "Close". */ mOpenCloseButton.SetText(Resource.String.close); /* Re-enable button since operation is complete. */ setAllComponentEnable(true); /* Disable match since both FMD templates must be created first. */ mMatchButton.Enabled = false; } else if (BiometricsResultCode.Intermediate == resultCode) { } else if (BiometricsResultCode.Fail == resultCode) { /* Re-enable button since operation is complete. */ mOpenCloseButton.Enabled = true; } }
public void OnFingerprintGrabbed(BiometricsResultCode resultCode, Bitmap bitmap, byte[] bytes, string filePath, byte[] WSQbytes, string WSQFilePath, string hint, int NFIQScore) { /* If hint is valid, display it. */ if (null != hint && hint.Length != 0) { mStatusTextView.Text = hint; } if (null != bitmap) { mFingerprintOneImageView.SetImageBitmap(bitmap); } if (BiometricsResultCode.Ok == resultCode) { mInfoTextView.Text = ("Quality: " + NFIQScore); /* Create template from fingerprint image. */ createFMDTemplate(bitmap); setAllComponentEnable(true); } else if (BiometricsResultCode.Intermediate == resultCode) { /* This case may occur if "cancelCapture()" or "closeFingerprint()" are called while * in middle of capture OR if capture failed. */ if (null != hint && hint.Equals("Capture Stopped")) { setAllComponentEnable(true); } } else if (BiometricsResultCode.Fail == resultCode) { mStatusTextView.Text = "Failed to capture fingerprint."; setAllComponentEnable(true); } }
public void OnInitialized(BiometricsResultCode p0, string p1, string p2) { int strID = Resource.String.bio_init_good; if (BiometricsResultCode.Ok == p0) { mOpenCloseButton.Enabled = true; setDeviceType(mBioManager.ProductName); } else if (BiometricsResultCode.Fail == p0) { strID = Resource.String.bio_init_failed; } Toast.MakeText(mContext, strID, ToastLength.Long).Show(); }
public void OnCompareFMD(BiometricsResultCode resultCode, float matchScore) { /* Re-enable all components since operation is now complete. */ setAllComponentEnable(true); if (BiometricsResultCode.Ok == resultCode) { String matchDecision = "Match Score = " + matchScore; mStatusTextView.Text = ("Matching complete."); mInfoTextView.Text = ("Match outcome: " + matchDecision); } else if (BiometricsResultCode.Fail == resultCode) { mStatusTextView.Text = "Failed to compare templates."; mInfoTextView.Text = ""; } }
public void OnCloseFingerprintReader(BiometricsResultCode resultCode, BiometricsCloseReasonCode closeReasonCode) { if (BiometricsResultCode.Ok == resultCode) { mStatusTextView.Text = ("Fingerprint Closed: " + closeReasonCode); } /* Now that sensor is closed, if user presses "mOpenCloseButton" fingerprint * sensor should now open. To achieve this we change flag which controls * what action mOpenCloseButton takes. */ mOpenFingerprint = true; /* Change text back to "Open" and allow button to be clickable. */ mOpenCloseButton.SetText(Resource.String.open); mOpenCloseButton.Enabled = true; /* Since sensor is closed, user should NOT be able to press capture or match. */ mCaptureButton.Enabled = false; mMatchButton.Enabled = false; }
public void OnInitialized(BiometricsResultCode p0, string p1, string p2) { int strID = Resource.String.bio_init_good; if (BiometricsResultCode.Ok == p0) { mOpenCloseButton.Enabled = true; setDeviceType(mBioManager.ProductName); } else if (BiometricsResultCode.Fail == p0) { strID = Resource.String.bio_init_failed; } mInfoTextView.Text = "C-SDK Jar version: " + mBioManager.SDKJarVersion; mStatusTextView.Text = "C-SDK Service version: " + mBioManager.ServiceVersion; Toast.MakeText(mContext, strID, ToastLength.Long).Show(); }
public void OnCompareFmd(BiometricsResultCode resultCode, float dissimilarity) { /* Re-enable all components since operation is now complete. */ setAllComponentEnable(true); if (BiometricsResultCode.Ok == resultCode) { String matchDecision = "No Match"; /* This is how to properly determine a match or not. */ if (dissimilarity < (int.MaxValue / 1000000)) { matchDecision = "Match"; } mStatusTextView.Text = ("Matching complete."); mInfoTextView.Text = ("Match outcome: " + matchDecision); } else if (BiometricsResultCode.Fail == resultCode) { mStatusTextView.Text = "Failed to compare templates."; mInfoTextView.Text = ""; } }
public void OnConvertToFMD(BiometricsResultCode p0, byte[] p1) { _finishedWithResult?.Invoke(new CovertToFMDResult { ResultCode = p0, FMD = p1 }); }
public void OnCloseFingerprintReader(BiometricsResultCode resultCode, BiometricsCloseReasonCode closeReasonCode) { /* This case is already handled by "mFingerprintOpenCloseListener". */ }