BluetoothConnector/src/main/java/com/kcoppock/bluetoothconnector/BluetoothActivity.java
private static BluetoothDevice findBondedDeviceByName (BluetoothAdapter adapter, String name) {
        for (BluetoothDevice device : getBondedDevices(adapter)) {
            if (name.matches(device.getName())) {
                Log.v(TAG, String.format("Found device with name %s and address %s.", device.getName(), device.getAddress()));
                return device;
            }
        }
        Log.w(TAG, String.format("Unable to find device with name %s.", name));
        return null;
    }
/**
     * Search the set of bonded devices in the BluetoothAdapter for one that matches
     * the given name
     * @param adapter the BluetoothAdapter whose bonded devices should be queried
     * @param name the name of the device to search for
     * @return the BluetoothDevice by the given name (if found); null if it was not found
     */
Search the set of bonded devices in the BluetoothAdapter for one that matches
the given name
@param adapter the BluetoothAdapter whose bonded devices should be queried
@param name the name of the device to search for
@return the BluetoothDevice by the given name (if found); null if it was not found
Search the set of bonded devices in the BluetoothAdapter for one that matches the given name @param adapter the BluetoothAdapter whose bonded devices should be queried @param name the name of the device to search for @return the BluetoothDevice by the given name ( if found ) ; null if it was not found
private static BluetoothDevice findBondedDeviceByName (BluetoothAdapter adapter, String name) {
        for (BluetoothDevice device : getBondedDevices(adapter)) {
            if (name.matches(device.getName())) {
                Log.v(TAG, String.format("Found device with name %s and address %s.", device.getName(), device.getAddress()));
                return device;
            }
        }
        Log.w(TAG, String.format("Unable to find device with name %s.", name));
        return null;
    }
private static BluetoothDevice findBondedDeviceByName ( BluetoothAdapter adapter , String name ) { for ( BluetoothDevice device : getBondedDevices ( adapter ) ) { if ( name . matches ( device . getName ( ) ) ) { Log . v ( TAG , String . format ( "Found device with name %s and address %s." , device . getName ( ) , device . getAddress ( ) ) ) ; return device ; } } Log . w ( TAG , String . format ( "Unable to find device with name %s." , name ) ) ; return null ; }
Search the set of bonded devices in the BluetoothAdapter for one that matches
 the given name
 @param adapter the BluetoothAdapter whose bonded devices should be queried
 @param name the name of the device to search for
 @return the BluetoothDevice by the given name (if found); null if it was not found
Search the set of bonded devices in the BluetoothAdapter for one that matches the given name @param adapter the BluetoothAdapter whose bonded devices should be queried @param name the name of the device to search for @return the BluetoothDevice by the given name ( if found ) ; null if it was not found