We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In examples apps that display lists of beacons and BLE devices, the list can be sorted, by RSSI, distance etc.
Sorting function from Alexis:
function sortBeaconsByProximity(beacons) { var beaconKeyRssiArray = []; var sortedBeacons = {}; for (var key in beacons) { beaconKeyRssiArray.push([beacons[key], key, beacons[key].rssi]); } beaconKeyRssiArray.sort(function(a, b) { return b[2] - a[2]; }); for (var i = 0; i < beaconKeyRssiArray.length; i++) { sortedBeacons[beaconKeyRssiArray[i][1]] = beaconKeyRssiArray[i][0]; } return sortedBeacons; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In examples apps that display lists of beacons and BLE devices, the list can be sorted, by RSSI, distance etc.
Sorting function from Alexis:
The text was updated successfully, but these errors were encountered: