Code example for BluetoothHeadset

Methods: stopVoiceRecognition

                public void onServiceDisconnected(int profile) 
                    Log.d(TAG, "Profile listener onServiceDisconnected"); //$NON-NLS-1$ 
                    mBluetoothHeadset = null; 
                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, 
Connect your IDE to all the code out there  Get Codota for Java