Esempio n. 1
0
 protected override void OnResume()
 {
     base.OnResume();
     if (_deviceActionService.SupportsNfc())
     {
         try
         {
             _messagingService.Send("resumeYubiKey");
         }
         catch { }
     }
 }
Esempio n. 2
0
 protected override void OnResume()
 {
     base.OnResume();
     if (_deviceActionService.SupportsNfc())
     {
         try
         {
             _messagingService.Send("resumeYubiKey");
         }
         catch { }
     }
     var setRestrictions = AndroidHelpers.SetPreconfiguredRestrictionSettingsAsync(this);
 }
Esempio n. 3
0
 protected override void OnResume()
 {
     base.OnResume();
     Xamarin.Essentials.Platform.OnResume();
     AppearanceAdjustments();
     if (_deviceActionService.SupportsNfc())
     {
         try
         {
             _messagingService.Send("resumeYubiKey");
         }
         catch { }
     }
     AndroidHelpers.SetPreconfiguredRestrictionSettingsAsync(this)
     .GetAwaiter()
     .GetResult();
 }
Esempio n. 4
0
        protected override void OnResume()
        {
            base.OnResume();

            if (Intent.Data?.Scheme == "cozypass")
            {
                OnOpenURL(Intent.DataString);
            }

            if (_deviceActionService.SupportsNfc())
            {
                try
                {
                    _messagingService.Send("resumeYubiKey");
                }
                catch { }
            }
            var setRestrictions = AndroidHelpers.SetPreconfiguredRestrictionSettingsAsync(this);
        }
Esempio n. 5
0
 private void ListenYubiKey(bool listen)
 {
     if (_deviceActionService.SupportsNfc())
     {
         _nfcSession?.InvalidateSession();
         _nfcSession?.Dispose();
         _nfcSession = null;
         if (listen)
         {
             _nfcSession = new NFCNdefReaderSession(_nfcDelegate, null, true)
             {
                 AlertMessage = AppResources.HoldYubikeyNearTop
             };
             _nfcSession.BeginSession();
         }
     }
 }
Esempio n. 6
0
 public static void ListenYubiKey(bool listen, IDeviceActionService deviceActionService,
                                  NFCNdefReaderSession nfcSession, NFCReaderDelegate nfcDelegate)
 {
     if (deviceActionService.SupportsNfc())
     {
         nfcSession?.InvalidateSession();
         nfcSession?.Dispose();
         nfcSession = null;
         if (listen)
         {
             nfcSession = new NFCNdefReaderSession(nfcDelegate, null, true)
             {
                 AlertMessage = AppResources.HoldYubikeyNearTop
             };
             nfcSession.BeginSession();
         }
     }
 }