Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望能够增加获取蓝牙信号强度 #22

Closed
mutouzhang opened this issue Nov 18, 2016 · 1 comment
Closed

希望能够增加获取蓝牙信号强度 #22

mutouzhang opened this issue Nov 18, 2016 · 1 comment

Comments

@mutouzhang
Copy link

希望能够增加获取蓝牙信号强度的功能

@edifangyi
Copy link

bleManager.scanDevice(new ListScanCallback(timeoutMillis) {
@OverRide
public void onLeScan(final BluetoothDevice device, final int rssi, byte[] scanRecord) {
super.onLeScan(device, rssi, scanRecord);
//rssi 就是信号强度,可以创建一个类,装进去
runOnUiThread(new Runnable() {
@OverRide
public void run() {
MDevice mDev = new MDevice(device, rssi);
if (mDevices.contains(mDev)) {
return;
} else {
mDevices.add(mDev);
stateLayout.showProgressView("正在搜索...已搜索到" + mDevices.size() + "个设备");
}
}
});

        }

        @Override
        public void onDeviceFound(final BluetoothDevice[] devices) {

        }
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants