3

Beacon 概述中,它说 Proximity Beacon API 支持 iBeacon。

这是否意味着我可以检测到 iBeacon 并使用 Android 应用程序中的Nearby Messages API检索附加到它的数据?

编辑:由于 iOS 的 Get Beacon 消息作为注释说:“iOS 的 Nearby API 仅支持查找 Eddystone 信标”,但它没有说明 Android 的 Nearby API 的任何内容,也许我们可以假设它可以看到每个信标的类型?我仍然希望对此进行确认。

4

2 回答 2

4

The good news is that Nearby supports iBeacon in addition to Eddystone beacons.

Using the Proximity Beacon API you can totally register iBeacons and attach data to them.

Then, you can tell Nearby to give you messages for the attachment data associated with these iBeacons (in Nearby, you just specify the attachment namespace for the appropriate strategies):

  MessageFilter filter = new MessageFilter.Builder()
      .includeNamespacedType("my-attachment-namespace", "")
      .build();
  Nearby.Messages.subscribe(client, messageListener, Strategy.BLE_ONLY);

See this Stackoverflow question for more hints on how to register an iBeacon using Proximity Beacon.

The note you saw is, however, correct: iBeacon is not supported on Nearby iOS just yet.

于 2015-08-25T14:29:05.143 回答
1

iOS 上的附近消息现在支持 iBeacon 扫描。并且刚刚添加了对后台扫描的支持。有关详细信息,请参阅附近消息开发人员站点CocoaPod

于 2016-06-23T20:08:46.167 回答