Code example for BluetoothHeadset

Methods: startVoiceRecognition

0
		if( device != null ){
			Log.e("MY BLUETOOTH", "Connecting Device");
			 // Use a temporary object that is later assigned to mmSocket, 
	        // because mmSocket is final 
	        //BluetoothSocket socket = null; 
			headset.startVoiceRecognition(device);
	        //startVoiceRecognition(device); 
	        // Get a BluetoothSocket to connect with the given BluetoothDevice 
//	        try { 
//	            // MY_UUID is the app's UUID string, also used by the server code 
//	            socket = device.createInsecureRfcommSocketToServiceRecord(MY_UUID); 
//	        } catch (IOException e) {Log.e("MY BLUETOOTH", "Hooking device to socket failed"); } 
//	         
//	        btAdapter.cancelDiscovery(); 
//	         
//	        try { 
//	            // Connect the device through the socket. This will block 
//	            // until it succeeds or throws an exception 
//	            socket.connect(); 
//	            Log.e("MY BLUETOOTH", "Connection successful"); 
//	        } catch (IOException connectException) {