Using this code snippet, as directed by Google's guide, presents an additional voice input screen.
<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>
What I want:
- "Ok, Glass"
- "Show me the pictures of puppies" (As per https://developers.google.com/glass/develop/gdk/ui/theme-widgets)
- MyPuppiesSlideshowActivity launches
What I'm getting:
- "Ok, Glass"
- "Show me the pictures of puppies"
- Microphone asking for more input is presented
- Say anything to the mic screen
- MyPuppiesSlideshowActivity launches
Can someone help me get rid of the two extra steps?
Related to this: Voice command for apps in Google Glass? but I couldn't comment on the original thread due to the lack of reputation...
Resolved!
I copied the code from this site verbatim
https://developers.google.com/glass/develop/gdk/input/voice
<trigger keyword="@string/glass_voice_trigger">
<input prompt="@string/glass_voice_prompt" />
</trigger>
And the input tag was the problem. Removing it took care of the prompt.
Thank you!