Code example for BluetoothHeadset

Methods: startVoiceRecognition

0
        public void onTick(long millisUntilFinished) 
        { 
            // First stick calls always returns false. The second stick 
            // always returns true if the countDownInterval is set to 1000. 
            // It is somewhere in between 500 to a 1000. 
            mBluetoothHeadset.startVoiceRecognition(mConnectedHeadset); 
 
            Log.d(TAG, "onTick startVoiceRecognition"); //$NON-NLS-1$ 
        } 
 
        @SuppressWarnings("synthetic-access") 
        @Override 
        public void onFinish() 
        { 
            // Calls to startVoiceRecognition in onStick are not successful. 
            // Should implement something to inform user of this failure 
            mIsCountDownOn = false; 
            Log.d(TAG, "\nonFinish fail to connect to headset audio"); //$NON-NLS-1$ 
        } 
    };