Voice commands do not work on Android device

I am making a very lightweight Android application that opens with a voice command. I tried with the start {label} and with the action like calling a taxi, but it didn’t work, I am missing something.

I added this to my wear (is that right?), And I turned around for wear and call.

manifest code:

<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> 
+5
source share
2 answers

There was the same problem. The solution was to add the android.intent.category.DEFAULT category 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 your phone, you can verify that your app is available in the “Call Car” section under “Voice Actions”.

For other non-English speaking users who are 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. If this still does not work, you can also try changing the device language to English.

+1
source

I have the same problem: OK Google, call me a taxi does not work.

I made a workaround: I named my taxi application, so now s sometimes launched when I say: OK Google, start a taxi.

0
source

Source: https://habr.com/ru/post/1204220/


All Articles