我正在尝试在 Android Wear 中添加语音功能并遵循以下 URL
https://developer.android.com/training/wearables/apps/voice.html https://developer.android.com/training/wearables/apps/voice.html
这是我的清单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.demowearapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-feature android:name="android.hardware.type.watch" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-sdk
android:minSdkVersion="20"
android:targetSdkVersion="20" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".TaxiActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.google.android.gms.actions.RESERVE_TAXI_RESERVATION" />
</intent-filter>
</activity>
</application>
</manifest>
但是当我在 LG G 手表中尝试以下语音命令时,它不会打开我的活动......它只显示 Google 搜索结果
“好的 Google,帮我叫一辆出租车”
“好吧,谷歌,给我叫一辆车”
Thanks.
可穿戴设备不知道这是一个可穿戴应用程序。 Wear 应用程序需要在其清单中添加此内容:<uses-feature android:name="android.hardware.type.watch" />
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)