nicolas2k / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
1 stars 0 forks source link

Voice trigger constraints on submenu items disable the entire menu #338

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create multiple Activities to put in a disambiguation submenu for the same 
initial trigger (in my case, I had "Choose from list" and "Flip a coin" under 
the "Make a request" trigger).
2. Create entries in the AndroidManifest.xml for each of these Activities with 
the same voice trigger (e.g. "Make a request") but different xml resources 
(i.e. one has a constraint and the other doesn't).
3. Disconnect Glass from networks (assuming the constraint was "network"), say 
"ok glass" and notice that "make a request" is disabled even though only one 
item in it has the constraint.

What is the expected output? What do you see instead?
Only the one submenu item with the constraint should have been disabled, not 
the entire menu. In other words, I expected to say "ok glass, make a request" 
and see "Choose from list" disabled but "Flip a coin" enabled. Instead, if I 
say "ok glass, make a request" I get the message "No network connectivity" 
before it has a chance to go to the submenu ("make a request" was grayed out 
after saying "ok glass").

What version of the product are you using? On what operating system?
Glass Version 2 XE12

Please provide any additional information below.
Here are the entries in my AndroidManifest.xml:
<activity
            android:name="com.twintitanium.glassapps.decisionmaker.ChooseFromListActivity"
            android:label="@string/choice_from_list"
            android:icon="@drawable/ic_choose_from_list" >
            <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/make_a_request_with_network_constraint_trigger" />
        </activity>
<activity
            android:name="com.twintitanium.glassapps.decisionmaker.FlipCoinActivity"
            android:label="@string/coin_flip"
            android:icon="@drawable/ic_flip_coin" >
            <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/make_a_request_trigger" />
        </activity>

As you can see, the first Activity (ChooseFromListActivity) uses the xml 
resource make_a_request_with_network_constraint_trigger while the other 
(FlipCoinActivity) uses make_a_request_trigger. Just to be clear, here are what 
these xml resources look like:

make_a_request_with_network_constraint_trigger.xml:
<?xml version="1.0" encoding="utf-8"?>
<trigger keyword="@string/glass_voice_trigger">
    <constraints
        network="true" />
</trigger>

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

Original issue reported on code.google.com by warlock....@gmail.com on 3 Jan 2014 at 11:05

GoogleCodeExporter commented 8 years ago

Original comment by allev...@google.com on 3 Jan 2014 at 11:14

GoogleCodeExporter commented 8 years ago
This has been fixed as of XE16.

Original comment by ala...@google.com on 16 Apr 2014 at 3:46