Code example for BluetoothHeadset

Methods: stopVoiceRecognition

0
                 */ 
                @Override 
                public void onServiceDisconnected(int profile) 
                { 
                    Log.d(TAG, "Profile listener onServiceDisconnected"); //$NON-NLS-1$ 
                    mBluetoothHeadset.stopVoiceRecognition(mConnectedHeadset); 
                    unregisterReceiver(mHeadsetBroadcastReceiver); 
                    mBluetoothHeadset = null; 
                } 
 
                @Override 
                public void onServiceConnected(int profile, BluetoothProfile proxy) 
                { 
                    Log.d(TAG, "Profile listener onServiceConnected"); //$NON-NLS-1$ 
 
                    // mBluetoothHeadset is just a head set profile,  
                    // it does not represent a head set device. 
                    mBluetoothHeadset = (BluetoothHeadset) proxy; 
 
                    // If a head set is connected before this application starts, 
                    // ACTION_CONNECTION_STATE_CHANGED will not be broadcast.