停止记录Android Beacon Library

我试图阻止 Android信标库的调试,但它不起作用.

我在我的gradle中有这个:

compile 'org.altbeacon:android-beacon-library:2.3.3'

我试过了:

public BeaconManager(Context ctx,org.altbeacon.beacon.BeaconManager beaconManager) {
    mContext = ctx;
    this.beaconManager = beaconManager;


    // this is saying deprecated
    this.beaconManager.setDebug(false);

    // I also tried this and the same thing
    org.altbeacon.beacon.logging.LogManager.setVerboseLoggingEnabled(false);

但无论如何,我一直在获取这些日志.他们开始调试其他事情.

02-18 16:21:29.784 31809-31818/com.myapp D/ScanRecord: first manudata for manu ID
02-18 16:21:29.784 31809-31818/com.myapp D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=45:0A:1B:49:64:7F,mScanRecord=ScanRecord [mAdvertiseFlags=6,mServiceUuids=[f41ef1ee-fde5-23be-5f4b-589c71babfdd],mManufacturerSpecificData={76=[2,21,97,104,113,9,-112,95,68,54,-111,-8,-26,2,-11,20,-55,109,3,17,-71,-89]},mServiceData={},mTxPowerLevel=-2147483648,mDeviceName=BC Beacon�],mRSSi=-106,mTimestampNanos=284946077119796}

任何线索?

解决方法

使用以下正则表达式创建自己的日志标记过滤器:
^(?!.*(ScanRecord)).*$

它将删除其中包含“ScanRecord”的所有行,如果需要,您可以通过执行(ScanRecord | BluetoothLeScanner)添加更多行

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...