简体   繁体   English

如何从Google Glass中的卡片启动意图

[英]How can I start an intent from a card in Google Glass

I've tried this app, Crystal Shopper : 我试过这个应用程序,Crystal Shopper:

https://crystalshopper.herokuapp.com/ https://crystalshopper.herokuapp.com/

which seems to be able to start an application from a card. 这似乎能够从卡开始申请。

As you can see in this screenshot 正如您在此屏幕截图中看到的那样

https://crystalshopper.herokuapp.com/static/images/barcode_search.png https://crystalshopper.herokuapp.com/static/images/barcode_search.png

there seems to be a command called 似乎有一个叫做的命令

crystalshopper://open crystalshopper://开放

Source seems unavailable, so I must infer... 来源似乎不可用,所以我必须推断......

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? 假设这只是一个动作,它通过镜像API告诉服务器向设备发送一个特殊通知,由BroadcastListener检测到,然后启动所需的Intent,这是正确的吗?

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. 如果安装在Glass上的APK注册了自定义URI方案,则Mirror API Glassware可以通过使用带有OPEN_URI操作的菜单项来启动它。 Set the payload attribute of the menu item to the custom URI and it will launch the appropriate activity when tapped. 将菜单项的payload属性设置为自定义URI,并在点击时启动相应的活动。

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

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