问题
I am trying to build an android app in js that can detect eddystone beacons emitting UID. I followed this : https://evothings.com/detecting-eddystone-beacons-in-javascript-made-easy/
But I can only detect beacon html.
I cannot find the line where you can look for UID. Does anyone has an idea ?
回答1:
Are you sure your beacon is set to broadcast the Eddystone-UID packet?
The thing to keep in mind is, Eddystone-UID and Eddystone-URL are two completely separate types of packets, and your beacon might only be able to broadcast one at a time.
Check with your beacon's vendor how to set it to broadcast the Eddystone-UID packet.
The Evothings PhoneGap plugin you're using returns both Eddystone-URL and Eddystone-UID packets it found, through a single success callback. The example app from the tutorial you've linked to then takes the beacon, figures out if its URL or UID (or both), and only shows what's available.
来源:https://stackoverflow.com/questions/34198803/eddystone-javascript-find-uid