android bluetoothadapter.startLeScan, filter by UUID

匿名 (未验证) 提交于 2019-12-03 00:59:01

问题:

I want to scan BLE device with the startLeScan(UUID[] serviceUuids, LeScanCallback callback) method, now I have a UUID, it's a 16-bits value, for example, 00000000-0000-1000-8000-00805F9B34FB.

How can I use the UUID in startLeScan method, I write like this,

UUID[] uuid = new UUID[1]; uuid[0] = UUID.fromString("00000000-0000-1000-8000-00805F9B34FB"); mBluetoothAdapter.startLeScan(uuid, mLeScanCallback); 

But finally I can scan nothing. How can I resolve this problem.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!