Code example for BluetoothAdapter

Methods: getStateisDiscovering

0
		 
		if(bluetoothAdapter == null){
			return BLUETOOTH_NOTAVAILABLE;
		} else 
			 
		if(bluetoothAdapter.isDiscovering()){
			return BLUETOOTH_SCANNING;
		} else	 
		 
		if(bluetoothAdapter.getState() == BluetoothAdapter.STATE_ON){
			return BLUETOOTH_ON;
		} else 
		 
		return BLUETOOTH_OFF;
 
	} 
	 
	public int getLocationState(){ 
		 
		if(locationManager == null){
Connect your IDE to all the code out there  Get Codota for Java