Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Voice commands does not work on android gear

I'm doing a really easy android wear app, that open with a voice command. I've tried with start {label} and with an action as call a taxi, but didn't work, I'm missing somthing.

I added this one on my wear manifest (is this correct?) and I deployed on the wear and on the phone.

the manifest code is:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.karumi.kittwear" >

    <uses-feature android:name="android.hardware.type.watch" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.DeviceDefault" >
      <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
      <activity
            android:name="WearMainActivity"
            android:label="kit" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

      <activity
          android:name=".StartSearchMyCar">
        <intent-filter>
          <action android:name="com.google.android.gms.actions.RESERVE_TAXI_RESERVATION" />
        </intent-filter>
      </activity>

    </application>

</manifest>
like image 760
flipper83 Avatar asked Nov 11 '22 00:11

flipper83


1 Answers

Had the same problem. The solution was to add the category android.intent.category.DEFAULT to the intent filter:

    <activity android:name=".StartSearchMyCar">
        <intent-filter>
            <action android:name="com.google.android.gms.actions.RESERVE_TAXI_RESERVATION" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

If you open the Android Wear app on the phone you can verify that your app is available under "Call a car" beneath "Voice actions".

For other non-English speakers still having problems using the voice command you should double check the language used for voice commands on your device. Change it to English and try it out. If that still doesn't work you can try changing the device's language to English also.

like image 172
Roy Solberg Avatar answered Nov 14 '22 21:11

Roy Solberg