I need to write an application on Windows 10 desktop, to test and develop some embedded products with BLE. I know that BLE is more mature on iOS and Android (and even on Windows Phone), but we are used to Windows Desktop applications, developed in Visual Studio 2015, in c#.
I already developed with Windows 8.1 using a reference to WinRT runtime, to link the Bluetooth library in that framework.
Fron an initial overview, it seems that Windows 10 build 1511 has introduced some BLE improvements, for example pair/unpair from app.
But... how to access this new BLE APIs?
Windows 10 introduced the new Universal Windows Platform, the successot of Windows 8.1 WinRT.
Is there any chance to develop a winform or WPF application using the new APIs?
I tried this route, I managed to link the new APIs, but I stoppen on this error:
error CS1545: Property, indexer, or event 'BluetoothLEAdvertisementWatcher.Received' is not supported by the language; try directly calling accessor methods 'BluetoothLEAdvertisementWatcher.add_Received(TypedEventHandler<BluetoothLEAdvertisementWatcher, BluetoothLEAdvertisementReceivedEventArgs>)' or 'BluetoothLEAdvertisementWatcher.remove_Received(EventRegistrationToken)'
The code is prettty basic:
_bluetoothLEAdvertisemenetWatcher = new BluetoothLEAdvertisementWatcher();
_bluetoothLEAdvertisemenetWatcher.Received += OnAdvertisemenetReceivedAsync;
Or should I follow the way of an UWP application?
Thanks!