如何从服务器推送到 Google TV?
我有一个始终在 Google TV 上运行的应用程序。我希望我的服务器能够在有新消息时通知 Google TV。我可以通过让 Google TV 轮询服务器来做到这一点,但我一直在寻找更好的解决方案。
I have an app that will always be running on the Google TV. I would like for my server to be able to notify the Google TV when it has a new message. I could do this by having the Google TV poll the server but I was looking for a better solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Android 云到设备消息传递 (C2DM) 是首选方式。 http://code.google.com/android/c2dm/
Android Cloud to Device Messaging (C2DM) is the preferred way. http://code.google.com/android/c2dm/
如果您的服务器逻辑在 Google App Engine 上运行,则您可能可以使用通道 http://code.google.com/appengine/docs/java/channel/overview.html(是的,我知道,这是一个在黑暗中进行的长期尝试)。
If your server logic is running on Google App Engine, possibly you can use a channel http://code.google.com/appengine/docs/java/channel/overview.html (yes, I know, this is a long shot in the dark).
我本来会使用服务器端事件或网络套接字,但后来在 caniuse.com 上注意到它在 Android 浏览器上不受支持,仅在 chrome 上受支持。这提出了一个有趣的观点。当尝试确定 Google-TV 浏览器(例如 3.1 或 3.2)支持的内容时,我们是否仅使用 Android 浏览器支持作为参考,还是有来源为我们提供有关 HTML5 和其他支持的具体信息?
I would have used server side events, or web sockets, but then noticed on caniuse.com that it's not supported on the Android browser, just on chrome. Which brings up an interesting point. When trying to determine what is supported by the Google-TV browser, on 3.1 or 3.2 for instance, do we just use the Android browser support as reference or is there a source that provides us specific information concerning HTML5 and other support?