按照Google指南的指示,使用此代码片段将显示一个额外的语音输入屏幕。
<activity
android:name="ca.lvin.myfirstglassapp.MyPuppiesSlideshowActivity "
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="@xml/my_voice_trigger" />
</activity>我想要的:
我得到的是:
有人能帮我摆脱这两个额外的步骤吗?
与此相关:Voice command for apps in Google Glass?,但我不能评论原来的线程,因为缺乏声誉.
解决了!
我逐字复制了这个站点的代码
https://developers.google.com/glass/develop/gdk/input/voice
<trigger keyword="@string/glass_voice_trigger">
<input prompt="@string/glass_voice_prompt" />
</trigger>输入标签就是问题所在。移除它处理了提示符。
谢谢!
发布于 2013-12-13 15:19:32
如果不看到您的语音触发器XML,我无法确定,但听起来您可能已经编写了触发器,希望通过包含以下行来期望获得更多的输入:
<input prompt="@string/glass_voice_prompt" />从你的扳机上移开那条线,它不会提示你。
https://stackoverflow.com/questions/20557320
复制相似问题