示例#1
0
        private Task PlatformScanAsync(NdefScanOptions options = null)
        {
            string subscription = "NDEF";

            if (options != null)
            {
                subscription = options.RecordType;
            }
            subscriptionReference = proximityDevice.SubscribeForMessage(subscription, MessageReceived);

            return(Task.FromException(new NotImplementedException()));
        }
示例#2
0
        private Task PlatformScanAsync(NdefScanOptions options = null)
        {
            session?.BeginSession();

            if (options != null)
            {
                if (options.Signal != null)
                {
                    options.Signal.Register(Cancelled);
                }
            }
            return(Task.CompletedTask);
        }
示例#3
0
        private Task PlatformScanAsync(NdefScanOptions options = null)
        {
            string subscription = "NDEF";

            if (options != null)
            {
                if (options.Signal != null)
                {
                    options.Signal.Register(Unsubscribe);
                }

                if (!string.IsNullOrEmpty(options.RecordType))
                {
                    subscription = options.RecordType;
                }
            }

            subscriptionReference = proximityDevice.SubscribeForMessage(subscription, MessageReceived);

            return(Task.CompletedTask);
        }
示例#4
0
 public Task ScanAsync(NdefScanOptions options = null)
 {
     return(PlatformScanAsync(options));
 }
示例#5
0
 private Task PlatformScanAsync(NdefScanOptions options = null)
 {
     return(Task.FromException(new PlatformNotSupportedException()));
 }
示例#6
0
 private async Task PlatformScanAsync(NdefScanOptions options = null)
 {
     s_adapter.EnableReaderMode(Xamarin.Essentials.Platform.CurrentActivity, this, NfcReaderFlags.NfcA | NfcReaderFlags.NfcB | NfcReaderFlags.NfcF | NfcReaderFlags.NfcV, null);
 }