|
- protected void bleDeviceFound(BluetoothDevice device, int rssi,
- byte[] scanRecord, int source) {
- Log.d("blelib", "[" + new Date().toLocaleString() + "] device found "
- + device.getAddress());
- Intent intent = new Intent(BleService.BLE_DEVICE_FOUND);
- intent.putExtra(BleService.EXTRA_DEVICE, device);
- intent.putExtra(BleService.EXTRA_RSSI, rssi);
- intent.putExtra(BleService.EXTRA_SCAN_RECORD, scanRecord);
- intent.putExtra(BleService.EXTRA_SOURCE, source);
- sendBroadcast(intent);
- }
复制代码
接收发现设备广播时,里面有 rssi 的信息 |
|