如何使用RxBle查找信标主要和次要号码

时间:2018-09-25 14:53:42

标签: android bluetooth-lowenergy rx-java rxandroidble

我在使用RxBle查找蓝牙信标的主要和次要编号时遇到麻烦。任何帮助,将不胜感激。我已经尝试过了

rxBleClient = ProxiApplication.getRxBleClient(this)
    scanDisposable = rxBleClient.scanBleDevices(
            ScanSettings.Builder()
                    .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
                    .setCallbackType(ScanSettings.CALLBACK_TYPE_ALL_MATCHES)
                    .build(),
            ScanFilter.Builder()
                    .build()
    ).observeOn(AndroidSchedulers.mainThread())
            .doFinally(this::dispose)
            .subscribe({
                Log.v("MainActivity", "scan results: ${it}"]
            }, {
                Log.v("MainActivity", "error: $it")
            })

0 个答案:

没有答案