No connectivity message in “ok glass” menu

2019-05-18 08:54发布

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条回答
The star\"
2楼-- · 2019-05-18 09:31

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>
查看更多
登录 后发表回答