Code example for BluetoothAdapter

Methods: getScanModegetStateisDiscovering

0
	@Override 
	public String getLogValue() {
		if(m_btAdapter == null)
			return "No Device"; 
		else{ 
			String rstr = "" + getStateStr(m_btAdapter.getState()) + " " + getScanModeStr(m_btAdapter.getScanMode()) + " " + m_btAdapter.isDiscovering();
			return rstr;
		} 
		 
	} 
	 
	private String getStateStr(int code){
		switch(code){
		case 10: return "STATE_OFF"; 
		case 12: return "STATE_ON"; 
		case 13: return "STATE_TURNING_OFF"; 
		case 11: return "STATE_TURNING_ON"; 
		default: return "UNKNOWN_CODE"; 
		} 
	} 
Contextual code suggestions in your IDE  Get Codota for Java