Code example for BluetoothDevice

Methods: getAddress

0
 
        return true; 
    } 
 
    private String getChannelKey(BluetoothDevice remoteDevice, int uuid) {
        return remoteDevice.getAddress() + "_" + Integer.toHexString(uuid);
    } 
 
    public String getName(BluetoothDevice remoteDevice) {
        if (remoteDevice.getAddress().equals("FF:FF:FF:00:00:00")) {
            return "localhost"; 
        } 
        if (!mNames.isEmpty()) {
            String name = mNames.get(remoteDevice.getAddress());
            if (name != null) {
                return name;
            } 
        } 
        return null; 
    }