No connectivity message in “ok glass” menu

爱⌒轻易说出口 提交于 2019-12-10 11:14:56

问题


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.

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


回答1:


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>


来源:https://stackoverflow.com/questions/21431359/no-connectivity-message-in-ok-glass-menu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!