问题
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.
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.
My question, Is there any way to catch AT+BVRA command received ?
If anybody know about this, please give your valuable suggestions.
回答1:
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>
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.
来源:https://stackoverflow.com/questions/20115098/android-catch-bluetooth-hfps-activate-voice-recognition