Is there any way to use ibeacons with Windows 10 development? Since ibeacons development with previous versions of Windows seemed nearly impossible, will we have the oportunity
Here is how you work with Apple iBeacons based on the new Windows 10 APIs mentioned in the answer by Rob Caplan:
BluetoothLEAdvertisementWatcher watcher = new BluetoothLEAdvertisementWatcher { ScanningMode = BluetoothLEScanningMode.Active };
watcher.Received += WatcherOnReceived;
private void WatcherOnReceived(BluetoothLEAdvertisementWatcher sender, BluetoothLEAdvertisementReceivedEventArgs btAdv)
{
// Optional: distinguish beacons based on the Bluetooth address (btAdv.BluetoothAddress)
// Check if it's a beacon by Apple
if (btAdv.Advertisement.ManufacturerData.Any())
{
foreach (var manufacturerData in btAdv.Advertisement.ManufacturerData)
{
// 0x4C is the ID assigned to Apple by the Bluetooth SIG
if (manufacturerData.CompanyId == 0x4C)
{
// Parse the beacon data according to the Apple iBeacon specification
// Access it through: var manufacturerDataArry = manufacturerData.Data.ToArray();
}
}
}
}
This is also how I implemented it in the open source Universal Beacon Library, which comes with complete sample code and an app to try it out: https://github.com/andijakl/universal-beacon