[iBeacon传输似乎不稳定,Altbeacon android Kotlin

问题描述 投票:0回答:1

[当我尝试创建iBeacon,然后检测到某个区域范围通知程序的信标后,它再次出现时,在很短的时间间隔内未通知培根,但是它掉了几秒钟,信标消失了,再次开始出现。

我希望在发出信标时,范围通知程序应始终返回该信标,但有时计数为0,然后再次返回该信标。

**val beacon = Beacon.Builder()
.setId1("f7826da6-4fa2-4e98-8024-bc5b71e0893e")
.setId2("1")
.setId3("2")
.setManufacturer(0x004c)
.setTxPower("-59")
.build()**

**beaconTransmitter = BeaconTransmitter (this, BeaconParser()
.setBeaconLayout ("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24");
beaconTransmitter?.startAdvertising(beacon)
mBeaconManager = BeaconManager.getInstanceForApplication(applicationContext)
mBeaconManager?.beaconParsers?.add(BeaconParser().setBeaconLayout("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"))**

**private val mRangeNotifier = RangeNotifier { beacons, region ->
   //Here I receive zero beacon some time, mostly it works but form very small interval of time beacon count is zero
}**

There should be proper detection of beacon so no inconsistency occurs, at least I could always track the beacons.

I have tested it on -
One plus 5 with Android version 9
One plus 6 Plus with Android version 9
Poco F1 with Android version 8

Library version - 2.16.4
altbeacon ibeacon-android transmission
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.