订阅后无法收到谷歌眼镜通知?

时间:2013-12-19 07:01:52

标签: google-glass google-mirror-api callbackurl google-playground

我创建了一个带有菜单项的时间线卡并订阅了相同的卡片。当我从镜子api游乐场尝试它(点击菜单项)时,它显示通知发送但我的服务无法接收任何通知。它没有显示任何击中我的服务日志的标志。

以下是我订阅的json。

{
"kind": "mirror#subscription",
"id": "timeline",
"updated": "2013-12-19T06:27:20.269Z",
"collection": "timeline",
"operation": [
"UPDATE"
],
"callbackUrl": "https://mirrornotifications.appspot.com/forward?url=http://192.xxx.xx.xxx:8080/GlassService/google/service/get_balance",
"verifyToken": "example_user",
"userToken": "email"
}

而不是在我使用localhost尝试的回调网址中的ip地址。我得到了相同的结果。

请帮助我。

提前致谢。

1 个答案:

答案 0 :(得分:2)

Google订阅不支持本地网址或代理。您必须提交具有SSL支持的公共网址才能进行回调,例如https://www.yourdomain.com/yourmethod

另一种方法是,您可以使用“Introspected tunnels to localhost”。然后您的本地网址将公开,您将在订阅后收到通知。