[Windows] Expose isPaired and canPair
I would like to monitor the pairing status so that I prompt the user to pair through Windows settings if needed. There are the isPaired and the carPair properties. I would be great of those would be exposed on the Flutter side.
Is there similiar APIs on other platforms?
As I read for iOS at least the answer is no. It could be indirectly inferred by trying to write some value and see if it succeeds or not. I guess https://github.com/woodemi/quick_blue/issues/54 needs to be addressed first in that case.
BluetoothLEAdvertisementWatcher VS DeviceWatcher
// auto aqsFilter = BluetoothDevice::GetDeviceSelectorFromPairingState(true) + L" AND System.Devices.Aep.IsConnected:=System.StructuredQueryType.Boolean#True";
auto aqsFilter = BluetoothDevice::GetDeviceSelectorFromPairingState(true);
auto requestedProperties = {
L"System.Devices.Aep.IsConnected",
L"System.Devices.Aep.DeviceAddress"
};
deviceWatcher = DeviceInformation::CreateWatcher(aqsFilter, requestedProperties, DeviceInformationKind::AssociationEndpoint);
Is there any chance that you could solve the #43 ?
As you may know, there isn't API for monitor a pairing status in iOS. In Android, there is a Broadcast intent ACTION_BOND_STATE_CHANGED
And also, each OS can retrieve bonded devices from system. (I am not sure if windows has the similar API.)
iOS
retrievePeripheralsWithIdentifiers: and retrieveConnectedPeripheralsWithServices:
Best Practices for Interacting with a Remote Peripheral Device
Android
Thanks a lot for the info
I'll take a look at it this weekend