Code example for BluetoothDevice

Methods: getAddress, getBondState, getName

0
String action = intent.getAction();
            if (BluetoothDevice.ACTION_FOUND.equals(action)) 
            {                 
                BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
                BTDeviceInfo bluetoothInfo = new BTDeviceInfo(device.getName(), device.getAddress(), device.getBondState());
                 
                if (lstBT == null)
                { 
                	lstBT = new ArrayList<BTDeviceInfo>();                	
                } 
                lstBT.add(bluetoothInfo);
            }  
            else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) 
            {            	 
            	Sensor_Bluetooth.cancelDiscovery(); 
                sample("scan"); 
                action(); 
            } 
            else if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(action)) 
            {