Code example for BluetoothDevice

Methods: getAddressgetBondStategetName

0
			@Override 
			public void onReceive(Context context, Intent intent) { 
				String sAction = intent.getAction(); 
				if (BluetoothDevice.ACTION_FOUND.equals(sAction)) { 
					BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); 
					Log.i(TAG, String.format("%s (%s) is found.", device.getName(), device.getAddress())); 
					if (device.getBondState() != BluetoothDevice.BOND_BONDED) { 
						deviceSet.add(device); 
					} 
				} else if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(sAction)) { 
					if (discoveryListener != null) { 
						discoveryListener.onStarted(); 
					} 
				} else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(sAction)) { 
					if (discoveryListener != null) { 
						discoveryListener.onFinished(); 
					} 
				} 
			} 
		}; 
		IntentFilter intentFilter = new IntentFilter();