10

I need to use bluetooth headset with voice recognition, which almost works fine in some devices like S3, S4 and Samsung Grand. However, when I tried same on Nexus 7, I am getting

BluetoothHeadsetServiceJni : Failed to start voice recognition, status: 6

error when I am calling startVoiceRecognition() method. I am using the code from this SO page.

What are the possible reasons for this issue occur only in some devices? Is there any way to solve this issue?

Community
  • 1
  • 1
Narayan soni
  • 821
  • 1
  • 10
  • 28

3 Answers3

3

Using shoe rat suggestion, modify the start method in the link and see if it will work.

public boolean start()
{
    if (!mIsStarted)
    {
        mIsStarted = true;
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB || "Nexus 7".equals(Build.MODEL)
        {
            mIsStarted = startBluetooth();
        }
        else
        {
            mIsStarted = startBluetooth11();
        }
    }

    return mIsStarted;
}
Hoan Nguyen
  • 18,033
  • 3
  • 50
  • 54
  • You can use `Build.MODEL` to determine the target model. That's, last condition in if block can be replaced with `"Nexus 7".equals(Build.MODEL)` – ozbek Sep 10 '14 at 23:09
  • if i do with nexus 7, may be this issue will occur in other devices, so How can i managed, i dont want any workaround i just want to know the reason behind with this issue, because for workaround we can also add on timer finish onScoAudioConnected method and it will work on all devices as much i checked – Narayan soni Sep 11 '14 at 09:47
1

I have been check as Narayan mentioned, I found BluetoothHeadset.STATE_AUDIO_CONNECTED does fire in nexus 7 as well some other ZTE devices, may be this is manufature fault or a that device does not support call and you are try to communicate via call_mode, I think there is only workaround to solve this issue

Aman
  • 220
  • 3
  • 9
0

Nexus 7 does not support VoiceRecognition,becuase Nexus 7 does not support Bluetooth HFP(handsfreee profile) who contains VoiceRecognition. You can find device Bluetooth info in https://www.bluetooth.org/tpg/listings.cfm.

farmer.chs
  • 1,409
  • 1
  • 10
  • 3
  • Its working on my nexus 7 but through workaround not as normally – Narayan soni Sep 16 '14 at 06:28
  • Really? Are you using AudioManager.startBluetoothSco() to start Bluetooth sco manully? – farmer.chs Sep 16 '14 at 07:43
  • Yes, i am calling onScoAudioConnected(); method call on mCountDown11 finish and i also added a check to identify BluetoothHeadset.STATE_AUDIO_CONNECTED was not called , after this its working almost in all devices as much i am able to check – Narayan soni Sep 16 '14 at 07:54