I attached data to Eddystone Beacons using The Proximity Beacon API. I want to fetch the Beacon attachments using Nearby Messages API.
I followed the steps mentioned at https://developers.google.com/nearby/messages/android/get-beacon-messages.
But I am not able to read Beacon attachments. The onFound()
method is not getting called
Check the following...
Set a callback on the response to subscribe and call startResolutionForResult on the Status object if the Status was APP_NOT_OPTED_IN . See github example
Make sure you've enabled the Nearby API in the Developer Console for your app. Step 3 here
Use Strategy.BLE_ONLY in the call to subscribe
Finally, if none of these help, try a stand-alone BLE scanning app just to make sure the beacon is actually broadcasting.
If you want to post a more complete code sample, one of our engineers can take a look
(I work on the Nearby API)