使用附近的Google API查找Eddystone信标 [英] Find Eddystone Beacons using Nearby Google API

查看:117
本文介绍了使用附近的Google API查找Eddystone信标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用The Proximity Beacon API将数据附加到Eddystone Beacons.我想使用附近的消息" API提取信标附件.

I attached data to Eddystone Beacons using The Proximity Beacon API. I want to fetch the Beacon attachments using Nearby Messages API.

我遵循了 https://developers.google上提到的步骤. com/nearby/messages/android/get-beacon-messages .

但是我无法阅读信标附件. onFound()方法没有被调用

But I am not able to read Beacon attachments. The onFound() method is not getting called

推荐答案

检查以下内容...

  • 如果Status为APP_NOT_OPTED_IN,则在响应上设置一个回调以订阅并在Status对象上调用startResolutionForResult.参见确保已在开发人员控制台中为您的应用启用了附近的API.步骤3 此处

    Make sure you've enabled the Nearby API in the Developer Console for your app. Step 3 here

    在通话中使用Strategy.BLE_ONLY进行订阅

    Use Strategy.BLE_ONLY in the call to subscribe

    最后,如果这些方法都没有帮助,请尝试使用独立的BLE扫描应用程序,以确保灯塔实际在广播.

    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

    (我在附近的API上工作)

    (I work on the Nearby API)

    这篇关于使用附近的Google API查找Eddystone信标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆