我该如何开始意图从谷歌玻璃卡 [英] How can I start an intent from a card in Google Glass
问题描述
我试过这个程序,水晶购物:
I've tried this app, Crystal Shopper :
https://crystalshopper.herokuapp.com/
,这似乎是能够启动从一个卡应用程序
which seems to be able to start an application from a card.
正如你在这张截图看到
<一个href="https://crystalshopper.herokuapp.com/static/images/bar$c$c_search.png">https://crystalshopper.herokuapp.com/static/images/bar$c$c_search.png
似乎有一个命令叫
crystalshopper://打开
crystalshopper://open
来源似乎不可用,所以我必须推断...
Source seems unavailable, so I must infer...
是正确的假设,这是一个简单的动作,通过镜像API,告诉服务器发送一个特定的通知到设备,它是由BroadcastListener,这将然后启动所需的意图检测?
Is correct to assume that this is simply an action which, through the Mirror API, tells the server to send a special notification to the device, which is detected by a BroadcastListener, which will then launch the required Intent?
推荐答案
如果安装在玻璃的APK注册了一个自定义的URI方案,镜子API玻璃器皿可以通过使用与 OPEN_URI <菜单项启动它/ code>的行动。将
有效载荷的菜单项自定义的URI
属性和发掘何时会推出相应的活动。
If an APK installed on Glass registers a custom URI scheme, Mirror API Glassware can launch it by using a menu item with the OPEN_URI
action. Set the payload
attribute of the menu item to the custom URI and it will launch the appropriate activity when tapped.
这篇关于我该如何开始意图从谷歌玻璃卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!