private void OnMessagePublished(NFCTag tag)
 {
     ImageWait.IsVisible = false;
     ImageOk.IsVisible   = true;
     //TagId_Label.Text = tag.TagId;
     //EventId_Label.Text = tag.MeetingCode;
     NFCController.StopAll();
     SendRequest(tag.TagId);
     //Application.Current.MainPage.DisplayAlert("Success", "Succesfully assigned tag " + tag.TagId + " to " + currentPosition.RoomName + "/" + currentPosition.PositionNumber, "Ok");
     currentPosition = null;
     GeneratePickerElements();
     NFCController.StartListening();
 }
        public void StartNFCListening()
        {
            firstOpen = true;
            NFCAvailable_Label.Text      = NFCController.IsAvailable ? "NFC available" : "NFC not supportet on Your phone";
            NFCAvailable_Label.TextColor = NFCController.IsAvailable? Color.Green : Color.Red;
            NFCEnabled_Label.Text        = NFCController.IsEnabled ? "NFC enabled" : "NFC disabled";
            NFCEnabled_Label.TextColor   = NFCController.IsEnabled? Color.Green : Color.Red;
            TagId_Label.Text             = "ID: ";

            if (NFCController.IsEnabled)
            {
                Title_Label.TextColor = Color.Green;
                NFCController.StartListening(OnMessageReceived, true);
            }

            ImageWait.IsVisible    = true;
            ImageOk.IsVisible      = false;
            Check_Button.IsEnabled = false;
        }
        public async Task StartAgain()
        {
            await Task.Delay(100);

            NFCController.StartListening(OnMessageReceived, true);
        }