Monday 15 February 2010

android - Unable to load voice trigger for activity -



android - Unable to load voice trigger for activity -

android manifest:

<uses-permission android:name="com.google.android.glass.permission.development" /> .... <activity android:name=".mainactivity" android:label="@string/app_name" android:icon="@drawable/ic_launcher" > <intent-filter> <action android:name="com.google.android.glass.action.voice_trigger" /> </intent-filter> <meta-data android:name="com.google.angroid.glass.voicetrigger" android:resource="@xml/voice_trigger" /> <intent-filter> <action android:name="android.speech.action.recognize_speech" /> <category android:name="android.intent.category.default" /> </intent-filter> </activity>

voice_trigger.xml (...\res\xml)

<?xml version="1.0" encoding="utf-8"?> <trigger keyword="@string/glass_voice_trigger" />

strings.xml

<string name="glass_voice_trigger">control</string>

whenever run code, voicetriggers logs unable build voice trigger main activity (throws voicetriggerbuildingexception) because config file voice trigger not found.

did else run across problem?

if you've androidmanifest.xml shared same using, have typo voice trigger meta-data:

<meta-data android:name="com.google.android.glass.voicetrigger" android:resource="@xml/voice_trigger" />

you had com.google.angroid... instead of com.google.android....

android xml google-glass

No comments:

Post a Comment