我努力注册我的应用程序以接受语音命令 - 提供的任何命令,系统或应用程序 - 但我继续失败。我想知道我是否正确使用意图?有人可以告诉我,我的可穿戴应用程序的AdrodManifest.xml
看起来是否正确?
<application android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.DeviceDefault">
<activity
android:name="com.volkanunsal.mtawear.WearableMainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="com.google.android.voicesearch.SELF_NOTE" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
编辑:
以下是清单文件的要点:
答案 0 :(得分:1)
试试这个:
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="com.google.android.voicesearch.SELF_NOTE" />
<data android:mimeType="text/plain"/>
</intent-filter>
来源:https://developer.android.com/training/wearables/apps/voice.html