I found this answer from another SO question that seems to be what you want. I tried this myself for my own utensils and it works great. As mentioned in the answer below, you need to warn that other applications that use the same “ok glass” voice command will share the submenu; in the following example, for example, some other applications may add other games, such as golf. Another potential problem is that for each of the parameters you want in the submenu, you must have a type of activity or service.
"If there are several actions / services installed on the glass that have the same intent filter for launching voicemail, all their names (based on the android:label attribute of the <activity> or <service> in AndroidManifest.xml ) will be displayed in the" submenu "meaning when you say that voice start.
For example (suppose res/xml/play_a_game_trigger.xml represents a voice trigger for the line "play a game"):
<activity android:label="Tennis"> <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/play_a_game_trigger" /> </activity> <activity android:label="Bowling"> <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/play_a_game_trigger" /> </activity>
will give you a voice menu stream that looks like
ok glass → play a game → Tennis Bowling
Please note, however, that this menu will also include actions / services from other APKs that also use the same voice start.
You can find more details on the Voice Input page of the GDK documentation page. "
Tony wickham
source share