示例#1
0
        public void RecheckEligibility(object sender, EventArgs eventArgs)
        {
            string canScanMsg = CheckFingerprintEligibility();

            if (_canScan)
            {
                _dialogFrag = FingerprintManagerApiDialogFragment.NewInstance();
                _initialPanel.Visibility = ViewStates.Visible;
                _errorPanel.Visibility   = ViewStates.Gone;
            }
            else
            {
                Log.Debug(TAG, "This device is still ineligiblity for fingerprint authentication. ");
                _dialogFrag = null;
                ShowError("Can't use this device for the sample.", canScanMsg);
            }
        }
示例#2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Forms.Forms.Init(this, savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);

            SetContentView(Resource.Layout.activity_fingerprintmanager_api);
            InitializeViewReferences();

            _fingerprintManager = FingerprintManagerCompat.From(this);
            string canScanMsg = CheckFingerprintEligibility();

            _startAuthenticationScanButton.Click += StartFingerprintScan;
            _failedScanAgainButton.Click         += RecheckEligibility;

            if (_canScan)
            {
                _dialogFrag = FingerprintManagerApiDialogFragment.NewInstance();
            }
            else
            {
                ShowError("Can't use this device for the sample.", canScanMsg);
            }
        }
 public SimpleAuthCallbacks(FingerprintManagerApiDialogFragment frag)
 {
     _fragment = frag;
 }