android 搜索ibeacon
发布于 4 年前 作者 fengna 3720 次浏览 来自 问答

android和ios使用ibeacon API搜索蓝牙,在wx.onBeaconUpdate(CALLBACK)回调中

ios间隔1秒返回扫描结果,且扫描结果是最新的。但是android毫秒级返回扫描结果,且android返回的列表时累积的,造成内存溢出,卡顿退出。

android 能否像ios一样返回最近扫描的蓝牙,而不是累积的。或者提供接口提供清空已扫描的列表。

2 回复

onBeaconUpdate 的回调函数是怎么写的呢?

wx.onBeaconUpdate((res) => {

//console.log(“onBeaconUpdate:” + new Date().getTime())

console.log(res.beacons)

_that.data.passinfo.beacons = res.beacons

})

回到顶部