Android Open Source - Android-BleEventAdapter Discovered Devices Event

From Project

Back to project page Android-BleEventAdapter.


The source code is released under:

Apache License

If you think the Android project Android-BleEventAdapter listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*from   w ww. j  a  va2s .  c  o  m*/
import android.bluetooth.BluetoothDevice;

import java.util.Arrays;
import java.util.Set;

public class DiscoveredDevicesEvent {

    private final BluetoothDevice[] bluetoothDevices;
    private final BluetoothDevice device;

    public DiscoveredDevicesEvent(BluetoothDevice device, Set<BluetoothDevice> mBluetoothDevices) {
        this.device = device;
        bluetoothDevices = mBluetoothDevices.toArray(new BluetoothDevice[mBluetoothDevices.size()]);

    public BluetoothDevice[] getBluetoothDevices() {
        return bluetoothDevices;

    public BluetoothDevice getDevice() {
        return device;

    public String toString() {
        return "DiscoveredDevicesEvent{" +
                "bluetoothDevices=" + Arrays.toString(bluetoothDevices) +

Java Source Code List