Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经使用 Eddystone 平台几个月了,一切运行良好。但是,在注册新信标时,我发现自己需要打开 Google 的 OAuth 2.0 Playground 以及与之相关的所有步骤,以便发送包含我的新 base64 编码 Eddystone-UID 的 PUT 请求。
有什么方法可以在不使用 OAuth 2.0 Playground 的情况下向 Eddystone 注册信标?我想构建一个独立的桌面 Java 应用程序来自动化这个过程,所以任何 Java 技巧都将不胜感激。
谢谢!
是的,您可以使用 Google 的 API 进行 OAuth 2.0 登录,然后对 Proximity Beacon API 进行网络服务调用。关键部分是在您的 Java 客户端上设置 OAuth 2.0。这两个文件可能会有所帮助:
使用 OAuth 2.0 访问 Google API
Java 的 API 客户端库
获得 OAuth 令牌后,您可以调用 API,如下所述。如果您正在使用游乐场,您可能已经这样做了。
Proximity Beacon API 入门
接近信标 API 概述