Android Open Source - Bluetooth-Manager-for-Glass Ble Device

From Project

Back to project page Bluetooth-Manager-for-Glass.


The source code is released under:

MIT License

If you think the Android project Bluetooth-Manager-for-Glass 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

package com.recursivepenguin.bluetoothmanagerforglass.ble;
//from  ww  w.jav a  2s . com
import android.bluetooth.BluetoothDevice;

public class BleDevice {
    BluetoothDevice device;
    int rssi;

    public BleDevice(BluetoothDevice device, int rssi) {
        this.device = device;
        this.rssi = rssi;

    public boolean equals(Object o) {
        if (o instanceof BleDevice) {
            BleDevice toCompare = (BleDevice) o;
            return this.device.equals(toCompare.device);
        return false;

    public int hashCode() {
        return device.hashCode();

    public String getName() {
        return device.getName();

    public String getAddress() {
        return device.getAddress();

    public void setRssi(int rssi) {
        this.rssi = rssi;

    public int getRssi() {
        return rssi;

Java Source Code List