Android抓住了蓝牙HFP的激活语音识别 [英] Android catch Bluetooth HFP's Activate Voice Recognition

查看:346
本文介绍了Android抓住了蓝牙HFP的激活语音识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当蓝牙免提设备连接到手机时,如果设备发送AT命令 AT + BVRA 以启用语音识别,则手机将启动默认的语音识别应用程序(如果支持).

When Bluetooth hands free device connected to mobile phone, if device sends an AT command AT+BVRA to enable voice recognition, the mobile phone launches the default voice recognition app if it supports.

我的Android手机(操作系统:4.1.2,型号:Samsung Galaxy Core I8262)启动了 S Voice 应用进行识别.

My android phone (OS : 4.1.2, Model : Samsung Galaxy Core I8262) launching S Voice app for recognition.

我认为,如果我的手机进行了更多的识别活动,则可能会显示列表以选择一个(如果没有默认设置).我从没观察到这种情况.

I think if my phone has more recognition activities, it may show list to select one, if no default set. I never observed this case.

我的问题,有什么方法可以捕获收到的AT + BVRA命令吗?

如果有人知道这一点,请提出您的宝贵建议.

If anybody know about this, please give your valuable suggestions.

推荐答案

要在Android上接收AT + BVRA,您需要获取VOICE_COMMAND意图.这就是您在AndroidManifest.xml中需要的内容

To receive AT+BVRA on Android, you need to grab the VOICE_COMMAND intent. This is what you need in your AndroidManifest.xml

<intent-filter>
    <action android:name="android.intent.action.VOICE_COMMAND"/>
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

在Samsung手机上,将S-Voice的优先级设置为高(如果我没记错的话,优先级为10).这意味着没有应用程序会达到此目的.您需要禁用S-Voice :( 说明如何禁用应用)以接收意图.

On Samsung phones, the priority for S-Voice is set high (10, if I recall correctly). This means that no application will get this intent. You need to disable S-Voice: (Instructions on how to disable apps) to receive the intent.

这篇关于Android抓住了蓝牙HFP的激活语音识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆