Altbeacon 警告:无法从 BluetoothCrashResolverState.txt 读取 mac

Altbeacon warning: Can't read macs from BluetoothCrashResolverState.txt

我尝试按照此处所述的步骤进行操作,https://github.com/RadiusNetworks/bluetooth-crash-resolver但未能成功。我从蓝牙包中复制了文件 BluetoothCrashResolver.java 并将其粘贴到我的代码库 (src/main/myProject) 中,并尝试在我的 MainActivity 中按以下方式使用它(它只是来自代码 altbeacon 站点的范围示例)。

public class RangingActivity extends Activity implements BeaconConsumer {
    protected static final String TAG = "RAAAAAAAAAAAAANNNNNNNNGGGGEEEEE";
    private BeaconManager beaconManager;
    private BlutoothCrashResolver bluetoothCrashResolver=null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ranging);
        bluetoothCrashResolver = new BlutoothCrashResolver(this.getApplicationContext());
        bluetoothCrashResolver.start();
  1. 我得到的第一个错误是无法解决BlutoothCrashResolver,这意味着我的导入不正确,我在顶部也有一个导入语句(import com.project.package.BluetoothCrashResolver;) , 但没用。

  2. 如果我以某种方式让它工作,我应该把这个语句放在哪里

    bluetoothCrashResolver.notifyScannedDevice(设备,myLeScanCallback);

  3. 最后,为什么信标测距会发生这种情况?监控代码对我来说效果很好。它是特定于我的设备(LG Tab 7)还是一般情况(我尝试了两个最新的 altbeacon arr 文件)。

特别关注@davidyoung。对此主题的一些反思将是非常值得赞赏的。

终于成功了。没有添加信标解析器只是一个愚蠢的错误。