What value/properties should I save if I want to reuse BluetoothLEDevice when restarting my app?

Taylor Yi 0 Reputation points
2024-08-26T14:18:35.0133333+00:00

I am making windows application that connects to nearby iPhones using BLE.

I'm using Windows App SDK to implement this feature.

What I want to do is, when I restart my application, I want to connect to previously connected device again.

I was thinking about saving the device's BLE MAC addresses when closing, but found out that BLE MAC addresses are often Random, and will change eventually.

I heard that BluetoothLEDevice.deviceId is constant as long as device is paired, but I couldn't find the reference.

What can I do to save previous BLE connections?

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
780 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.