コード例 #1
0
ファイル: Setup.cs プロジェクト: edfoh/VirtualWallDroid
        protected override IMvxApplication CreateApp()
        {
            var nfcService = new NfcService(new TagGeneratorService());

            Mvx.RegisterSingleton <INfcService>(nfcService);
            return(new Core.App());
        }
コード例 #2
0
 private void OnSuccessfulRead(string nfcData)
 {
     if (NfcService.DisplayCardAction == null)
     {
         Toast.MakeText(Application.Context, "Cannot read card id from nfc...", ToastLength.Long).Show();
     }
     else
     {
         var tagData = TagGeneratorService.RetrieveData(nfcData);
         if (!tagData.IsValid)
         {
             Toast.MakeText(Application.Context, "No card id found....", ToastLength.Long).Show();
         }
         else
         {
             NfcService.DisplayCardAction(tagData.CardId);
         }
         Finish();
     }
 }