简体   繁体   中英

Universal Windows 10 App shows confirmation when connecting to paired BLE device

I have a quick question - I'm writing a PoC app using Universal Windows 10 SDK (C#) and when I'm trying to connect to a previously paired BLE (Bluetooth Low Energy) device, I get a confirmation screen like this:

在此处输入图片说明

If I'm pressing on "Yes" everything is OK but I'm thinking what will happen if I will deploy this app to an IoT device that runs Windows 10 Core IoT. Is there any way to specify something in the app manifest in order to not show this screen anymore?

The code that leads to this is the following:

BluetoothLEDevice bleDevice = null;

try
{
  bleDevice = await BluetoothLEDevice.FromBluetoothAddressAsync(this.bluetoothDeviceAddress.Value);
  }
  catch (Exception exception)
  {
    lbBLEAddress.Text = exception.ToString();
    return;
   }

Thank you very much.

This sounds very similar to an issue I encountered when attempting to read the heart rate sensor from a Microsoft Band using an RPi 2 running Windows IoT Core.

I discovered that although the Band SDK worked with Windows IoT Core, there was limited functionality with regard to certain sensors which require user interaction through consent prompts.

At this time, it seems that the IoT Core does not contain the necessary libraries to create the popup dialog that is seen on other devices when executing this method. This post details and documents Windows.UI.Popups.MessageDialog as currently unsupported and is likely the root of your issue.

-Paul

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM