Reputation: 81
I have an Android app that connects to a specific type of Heart Rate Bluetooth device that continuously returns new Heart rate data. The device has a predefined name that always starts with "HRxxxx" and by using the if (device.getName().startsWith("HR"))
I am able to distinguish it from the other devices (i.e. headsets) and start a connection.
However, I have an issue, if two or more people are using the same type of device, how will they be able to discern which is their device (i.e. at the gym while running next to each other). Since both devices will start with "HR" they might connect to another person's device. As a result, are there any other approaches/ways in which I could use to get a specific device?
Upvotes: 0
Views: 1208
Reputation: 4236
you can use mac id of the bluetooth device. mac address is unique for every device.
Upvotes: 1