Glass XE17.1 - tap on "ok glass" menu with custom voice command is broken -
i used create 1 voice trigger prompts user speak additional commands before starting activity or service, like:
ok glass +-david ++-find me parking lot ++-show me stock chart
in xe17 or version(xe16.2), either using voice command or tap on "ok glass" menu shows list(vertical list voice) or list of command cards (horizontal menu), in xe17.1 update, when tap on 'ok glass', hangs , no menu cards shows up, ok glass launcher, no other default voice triggers cards, after short debug, found it's same voice trigger
"android:resource="@xml/voice_trigger"
declare in androidmenifest.xml caused issue, voice command still works, help? thanks!
ps. , also, im trying input prompt 2 more prompt won't work.
<input prompt="@string/glass_voice_prompt"/>
my code (gdk api19, rev.5)
<> androidmanifest.xml
<uses-permission android:name="com.google.android.glass.permission.development"/> <activity android:name=".promptactivity" android:label="@string/app_name" android:theme="@style/menutheme" android:icon="@drawable/ic" android:enabled="true" /> <activity-alias android:name="find me parking lot" android:label="find me parking lot" android:targetactivity=".promptactivity" android:icon="@drawable/hippo_icon" > <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/hippo_voice_trigger_david" /> <!---here problem(two same voice trigger won't allow more-> </activity-alias> <activity-alias android:name="show me stock chart" android:label="show me stock chart" android:targetactivity=".promptactivity" android:icon="@drawable/hippo_icon" > <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/hippo_voice_trigger_david" /> <!---here problem-> </activity-alias>
<> hippo_voice_trigger_david.xml
<?xml version="1.0" encoding="utf-8"?> <trigger keyword="@string/glass_voice_david_prompt"> <constraints network="true" camera="true" /> </trigger>
<> res/values/strings.xml
<string name="glass_voice_david_prompt">david</string>
<> here logcat exception:
fatal exception: main process: com.google.glass.home, pid: 5738 java.lang.nullpointerexception @ com.google.glass.home.voice.touchmainmenuactivity.oncreateoptionsmenu(touchmainmenuactivity.java:122) @ android.app.activity.oncreatepanelmenu(activity.java:2543) @ com.android.internal.policy.impl.phonewindow.preparepanel(phonewindow.java:439) @ com.android.internal.policy.impl.phonewindow.openpanel(phonewindow.java:602) @ com.android.internal.policy.impl.phonewindow.openpanel(phonewindow.java:555) @ android.app.activity.openoptionsmenu(activity.java:2878) @ com.google.glass.app.glassvoiceactivity.openoptionsmenu(glassvoiceactivity.java:456) @ com.google.glass.home.voice.touchmainmenuactivity.onattachedtowindow(touchmainmenuactivity.java:93) @ com.android.internal.policy.impl.phonewindow$decorview.onattachedtowindow(phonewindow.java:2793) @ android.view.view.dispatchattachedtowindow(view.java:12592) @ android.view.viewgroup.dispatchattachedtowindow(viewgroup.java:2458) @ android.view.viewrootimpl.performtraversals(viewrootimpl.java:1242) @ android.view.viewrootimpl.dotraversal(viewrootimpl.java:1025) @ android.view.viewrootimpl$traversalrunnable.run(viewrootimpl.java:5699)
Comments
Post a Comment