Exemple #1
0
        private async void BleAdvert_UpdatedBleAdvertisement(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementReceivedEventArgs data)
        {
            var isPause = uiPause.IsChecked.Value;

            if (!isPause)
            {
                await UpdateUI(data, TrackAll);
            }
        }
Exemple #2
0
        private async void BleAdvert_UpdatedUniversalBleAdvertisement(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementReceivedEventArgs data)
        {
            // Only do this if the user wants to see all data...
            var isPause = uiPause.IsChecked.Value;

            if (TrackAll && !isPause)
            {
                await UpdateUI(data, TrackAll);
            }
        }
Exemple #3
0
        private async void Watcher_Received(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher sender,
                                            Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementReceivedEventArgs args)
        {
            ushort identifier = args.Advertisement.ManufacturerData.First().CompanyId;

            byte[] data   = args.Advertisement.ManufacturerData.First().Data.ToArray();
            var    ignore = Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                latitude  = BitConverter.ToDouble(data, 0);
                longitude = BitConverter.ToDouble(data, 8);

                TextBlock.Text = latitude.ToString();
                /* GPS Data Parsing / UI integration goes here */
            });
        }