问题描述
我当前正在构建一个应用程序,将我的设备变成信标,同时扫描其他信标.
I'm currently building an app that turns my device into a Beacon while simultaneously scanning for other Beacons.
我目前已经实现了2个软件包:
I've currently implemented 2 packages:
- flutter_beacon: https://pub.dev/packages/flutter_beacon
- 信标广播: https://pub.dev/packages/beacon_broadcast
- flutter_beacon: https://pub.dev/packages/flutter_beacon
- beacon_broadcast: https://pub.dev/packages/beacon_broadcast
除了我正在广播AltBeacon并扫描iBeacon之外,一切都按预期工作,所以我的应用无法识别我正在广播的信号.
Everything is working as intended except that I'm broadcasting an AltBeacon and scanning for iBeacon, so my app can't recognize the signal I'm broadcasting.
是否有一个广播iBeacon或监视AltBeacon的软件包?或者也许是实现我想要达到的目标的另一种方式?任何建议都将不胜感激,因为我受困于想法.
Is there a package that either broadcasts iBeacon or monitors AltBeacon? Or maybe another way of achieving what I want to achieve? Any advice is greatly appreciated, as I'm stuck and out of ideas.
推荐答案
您可以将beacon_broadcast更改为像这样使用iBeacon;
You can change beacon_broadcast to use iBeacon like this;
beaconBroadcast
.setUUID('39ED98FF-2900-441A-802F-9C398FC199D2')
.setMajorId(1)
.setMinorId(100)
.setTransmissionPower(-59) //optional
.setIdentifier('com.example.myDeviceRegion') //iOS-only, optional
.setLayout('m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24')
.setManufacturerId(0x004C)
.start();
上面的重要更改是布局和制造商ID.
The important changes above are the layout and manufacturer Id.
这篇关于Flutter中的信标功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!