简体   繁体   English

Proximity Beacon API vs Android Beacon Library?

[英]Proximity Beacon API vs Android Beacon Library?

I'm new with the beacon technology and I have some doubts.我是信标技术的新手,我有一些疑问。

  1. What is the difference (who is better) between the Proximity Beacon API vs Android Beacon Library ?Proximity Beacon APIAndroid Beacon Library之间有什么区别(谁更好)?
  2. Proximity Beacon API is completely free? Proximity Beacon API 是完全免费的吗? I was searching and I saw in the Google Developer Console that this API have a limit of request per day (1,000,000 request/day).我正在搜索,我在 Google Developer Console 中看到这个 API 有每天的请求限制(1,000,000 个请求/天)。 I tried to search what is the quota if I spend that amount but I didn't find nothing.如果我花费了那个金额,我试图搜索配额是多少,但我什么也没找到。 Android Beacon Library have a request per day limit? Android Beacon 库每天有一个请求限制吗?

Until now I'm going to use the Eddystone format, so, both of them support Eddystone.到目前为止,我将使用 Eddystone 格式,因此,它们都支持 Eddystone。

Thanks谢谢

Both the open source Android Beacon Library or Google's Proximity Beacon API allow Android apps to detect Eddystone-compatible beacons.开源 Android Beacon Library 或 Google 的 Proximity Beacon API 都允许 Android 应用程序检测与 Eddystone 兼容的信标。

  • The Android Beacon Library is a client only API. Android Beacon 库是仅限客户端的 API。 It is completely free and covered by the Apache 2 open source license , with no resource limits.它是完全免费的,并受 Apache 2 开源许可证的保护,没有资源限制。 It does not require any server infrastructure and provides callbacks when beacons are detected, and ranging callbacks to tell you approximately how far they are away when they continue to be around.它不需要任何服务器基础设施,并在检测到信标时提供回调,并提供范围回调以告诉您当它们继续存在时它们距离大约多远。 It can also launch your app in the background on beacon detection.它还可以在信标检测的后台启动您的应用程序。 It is a good choice when you need a general-purpose beacon solution or need flexible low-level access to beacon detections.当您需要通用信标解决方案或需要对信标检测进行灵活的低级别访问时,这是一个不错的选择。

  • Google's Proximity Beacon API , by contrast, is a higher-level and more specialized server API.相比之下,Google 的Proximity Beacon API是更高级别和更专业的服务器 API。 It requires that beacons be registered with Google's servers , and allows attaching both public and private metadata to these beacons.要求在 Google 的服务器上注册信标,并允许将公共和私有元数据附加到这些信标上。 The related Nearby Messages API will then provide a callback when a beacon is discovered, and tell you the data that you have attached to this beacon.然后,相关的 Nearby Messages API 将在发现信标时提供回调,并告诉您附加到该信标的数据。 It is designed to return high-level beacon data, and not provide low-level access to beacon detections .它旨在返回高级信标数据,而不提供对信标检测的低级访问 As you mention, there are some limits on how many calls you can make.正如您所提到的,您可以拨打的电话数量有一些限制。 This library requires a recent version of Google Play Services, which is typically available on newer phones in the United States and Europe, but is typically not available in China and some other countries .此库需要最新版本的 Google Play 服务,该服务通常可在美国和欧洲的较新手机上使用,但在中国和其他一些国家/地区通常不可用

Which you choose depends on which helps you solve your use case.您选择哪种方式取决于哪种方式可以帮助您解决用例。 If you require the cloud-storage features of a server-based solution, and can live with dependencies on Google Play Services, then this may be the right choice for you.如果您需要基于服务器的解决方案的云存储功能,并且可以依赖于 Google Play 服务,那么这可能是您的正确选择。 If you need a more flexible solution, and do not require a server API, the Android Beacon Library may work well for you.如果您需要更灵活的解决方案,并且不需要服务器 API,那么 Android Beacon 库可能适合您。

EDIT: one other important point to add here: Any API backed by a server is dependent on an entity keeping those servers going to keep your app working in the future.编辑:要在此处添加的另一个重要点:由服务器支持的任何 API 都依赖于一个实体,使这些服务器在未来保持您的应用程序正常运行。 It is not unusual for companies, particularly Google, to discontinue services when the company's business priorities change.当公司的业务重点发生变化时,公司,尤其是谷歌,停止服务并不罕见。 Consider the long list of Google's discontinued services, including Google Nearby support for beacon notifications.考虑一长串 Google 已停产的服务,包括 Google Nearby 对信标通知的支持。 If you need your app to continue working long-term, be careful about adding a dependency on a third party to keep a server running.如果您需要您的应用程序继续长期运行,请注意添加对第三方的依赖以保持服务器运行。 This creates risk.这会产生风险。 Because the Android Beacon Library requires no server, there is no risk of it not working in the future based on the whims of corporate decision-making.由于 Android Beacon 库不需要服务器,因此基于企业决策的突发奇想,它不会有将来无法运行的风险。 The same is not true of the Proximity Beacon API. Proximity Beacon API 并非如此。

Full Disclosure: I am the lead developer on the Android Beacon Library.完全披露:我是 Android Beacon 库的首席开发人员。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM