在"ok glass"中没有连接消息.菜单 [英] No connectivity message in "ok glass" menu

查看:32
本文介绍了在"ok glass"中没有连接消息.菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,当用户从菜单中选择选项时,就像示例应用程序一样,它将实时卡添加到时间线中.我注意到,当您没有任何连接时,玻璃上的本机应用程序(例如Google)会在确定的玻璃"菜单中显示无网络连接"消息,并且无法运行它们.

I am developing an app which adds a live card into the timeline when the user selects the option from menu, like the sample apps do. I noticed that, when you don't have any connectivity, the native apps on the glass, like Google, show "No network connectivity" message in the "ok glass" menu and it is not possible to run them.

我想复制这种行为.是否可以使用GDK API做到这一点?

I would like to replicate this behavior. Is there a way to do this with the GDK API?

推荐答案

您可以通过在语音触发器中添加network约束来实现此目的,如

You can do this by adding the network constraint to your voice trigger, as described in the GDK Voice Input documentation. For example:

<trigger keyword="@string/your_voice_trigger">
    <constraints network="true" />
</trigger>

这篇关于在"ok glass"中没有连接消息.菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆