Code example for BluetoothDevice

Methods: getAddress

0
     * @return true if the address matches the candidate device 
     */ 
    private boolean checkCandidateDevice(BluetoothDevice device,
            String targetAddress) {
        Log.d(TAG, "Found Bluetooth device: " + device);
        if(device.getAddress().equals(targetAddress)) {
            Log.d(TAG, "Found matching device: " + device);
            return true; 
        } 
        return false; 
    } 
 
    /** 
     * Check the list of previously paired devices for one matching the target 
     * address. Once a matching device is found, calls captureDevice to connect 
     * with it. 
     * 
     * This will not attempt to pair with unpaired devices - it's assumed that 
     * this step has already been completed by the user when selecting the 
     * Bluetooth device to use. If this class is used programatically with a 
     * hard-coded target address, you'll need to have previously paired the