首页 > 解决方案 > 从信标扫描和读取数据(EM Microelectronic:EMBC02)

问题描述

我正在尝试创建一个使用 BLE 扫描信标并从中检索数据的 Android 应用程序,所以我将使用这个库: Android Beacon Library

知道如何使用它,尤其是如何仅扫描EM Microelectronic EMBC02信标吗?

我尝试在这里使用 2 示例,但无法始终找到我的信标。有人提到我应该使用这种方法setBeaconLayout(),但我不知道如何。

    // To detect proprietary beacons, you must add a line like below corresponding to your beacon
    // type.  Do a web search for "setBeaconLayout" to get the proper expression.
    // beaconManager.getBeaconParsers().add(new BeaconParser().
    //        setBeaconLayout("m:2-3=beac,i:4-19,i:20-21,i:22-23,p:24-24,d:25-25"));

标签: androidbluetooth-lowenergybeacon

解决方案


该信标模型使用 iBeacon 布局。您必须将布局字符串配置到库中。您可以在此处找到布局字符串:https ://beaconlayout.wordpress.com


推荐阅读