Hey guys with the introduction of the Glass development Sneak Peek, I found the way to add your own voice command to trigger your app. This is for native Android Apps.
What you have to do is,
inside the manifest file add these tags under the service which you wanted to trigger on your voice command.
<action android:name=”com.google.android.glass.action.VOICE_TRIGGER” />
Step 2And you have to create a folder called xml inside res and add a xml file named as “voice_trigger_start.xml”
Inside that add these lines
<?xml version=”1.0″ encoding=”utf-8″?>
<trigger keyword=”@string/its_me_amalan” />
Open the values folder inside res folder and edit strings.xml, so it will look like this
<string name=”its_me_amalan”>Hello Amalan</string>
Now install the app into the google glass and say
OK GLASS Hello Amalan
And the app opens
I have used my name 😉 but you can try lots of other words.
Please install the latest Glass Development KIT and tryout the samples, you can get more out of it 🙂