Android Open Source - Arduino-Android-BLE-NRF8001 Bluetooth Meta Data






From Project

Back to project page Arduino-Android-BLE-NRF8001.

License

The source code is released under:

MIT License

If you think the Android project Arduino-Android-BLE-NRF8001 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 edu.uci.fallsensor.service;
//  w w w  .  j a  v  a  2  s . c  o m
import android.bluetooth.BluetoothDevice;

import java.util.HashMap;

public class BluetoothMetaData {
    private static BluetoothMetaData instance;
    private HashMap<String, Integer> deviceRssi;

    public static BluetoothMetaData getInstance() {
        if (instance == null) {
            instance = new BluetoothMetaData();
        }
        return instance;
    }

    private BluetoothMetaData() {
        deviceRssi = new HashMap<String, Integer>();
    }

    public int getRssi(BluetoothDevice device) {
        return deviceRssi.get(device.getAddress()).intValue();
    }

    public void putDevice(BluetoothDevice device, int rssi) {
        deviceRssi.put(device.getAddress(), rssi);
    }
}




Java Source Code List

com.adapters.ListAdapterCheckboxTitle.java
com.adapters.ListAdapterTitleDescription.java
com.adapters.ListAdapterTitleDescription.java
com.adapters.MainViewPagerAdapter.java
com.ble.sensors.NRF8001.java
edu.uci.fallsensor.MainActivity.java
edu.uci.fallsensor.dialog.SensorDialog.java
edu.uci.fallsensor.service.BLEController.java
edu.uci.fallsensor.service.BLEManager.java
edu.uci.fallsensor.service.BLEState.java
edu.uci.fallsensor.service.BLETask.java
edu.uci.fallsensor.service.BluetoothMetaData.java