Back to project page Arduino-Android-BLE-NRF8001.
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.
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); } }