2016-07-14 5 views
0

Я пытаюсь обнаружить маяк с Android Beacon Library. В случае переднего плана он работает хорошо, но в фоновом режиме он не работает. Мое приложение реализует BootstrapNotifier. Я следующие строки в OnCreate()Не удается обнаружить AltBeacon в фоновом режиме

org.altbeacon.beacon.Region region = new org.altbeacon.beacon.Region("Region", null, null, null); 
regionBootstrap = new RegionBootstrap(this, region); 

didEnterRegion():

@Override 
public void didEnterRegion(org.altbeacon.beacon.Region region) { 
    Log.d("beacon", "Got a didEnterRegion call"); 

    Intent intent = new Intent(this, MainDashboardActivity.class); 
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
    this.startActivity(intent); 
} 

Я пытался читать журналы и без маяка он выглядит следующим образом:

07-14 15:16:16.848 13592-13592/com.mobium1182.app D/BluetoothAdapter: startLeScan(): null 
07-14 15:16:16.851 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=5 
07-14 15:16:16.965 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-70, mTimestampNanos=9110127109925} 
07-14 15:16:17.144 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-76, mTimestampNanos=9110307089196} 
07-14 15:16:17.326 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-76, mTimestampNanos=9110488244613} 
07-14 15:16:17.694 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-76, mTimestampNanos=9110857037061} 
07-14 15:16:18.607 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-94, mTimestampNanos=9111769944352} 
07-14 15:16:18.979 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-70, mTimestampNanos=9112141879248} 
07-14 15:16:19.160 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-76, mTimestampNanos=9112322519560} 
07-14 15:16:19.346 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-78, mTimestampNanos=9112508265914} 
07-14 15:16:19.529 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-94, mTimestampNanos=9112691427893} 
07-14 15:16:19.894 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-75, mTimestampNanos=9113056789456} 
07-14 15:16:21.004 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9114166633518} 
07-14 15:16:21.182 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9114344215653} 
07-14 15:16:21.545 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-77, mTimestampNanos=9114707169507} 
07-14 15:16:21.726 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-81, mTimestampNanos=9114888275496} 
07-14 15:16:21.911 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9115074133986} 
07-14 15:16:22.104 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9115266620444} 
07-14 15:16:22.470 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-79, mTimestampNanos=9115631781798} 
07-14 15:16:22.651 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9115813068100} 
07-14 15:16:23.014 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9116176225965} 
07-14 15:16:23.942 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-80, mTimestampNanos=9117102104350} 
07-14 15:16:24.669 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-72, mTimestampNanos=9117831349558} 
07-14 15:16:24.850 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9118012431433} 
07-14 15:16:25.215 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9118377511381} 
07-14 15:16:25.397 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-86, mTimestampNanos=9118559377943} 
07-14 15:16:25.583 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-67, mTimestampNanos=9118745223828} 
07-14 15:16:26.131 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-87, mTimestampNanos=9119293121276} 
07-14 15:16:26.314 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9119476461536} 
07-14 15:16:26.870 13592-13592/com.mobium1182.app D/BluetoothAdapter: stopLeScan() 

И с включенным маяком это:

07-14 15:16:36.850 13592-13592/com.mobium1182.app D/BluetoothAdapter: startLeScan(): null 
07-14 15:16:36.853 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=5 
07-14 15:16:36.931 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-80, mTimestampNanos=9130093610543} 
07-14 15:16:37.115 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-80, mTimestampNanos=9130277744501} 
07-14 15:16:37.300 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-77, mTimestampNanos=9130462197001} 
07-14 15:16:37.486 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-90, mTimestampNanos=9130648694084} 
07-14 15:16:37.631 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=C3:77:13:2D:C1:64, mScanRecord=ScanRecord [mAdvertiseFlags=4, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -71, 64, 127, 48, -11, -8, 70, 110, -81, -7, 37, 85, 107, 87, -2, 109, 18, 52, 26, 84, -61]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-42, mTimestampNanos=9130793836324} 
07-14 15:16:37.671 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-80, mTimestampNanos=9130833928407} 
07-14 15:16:38.221 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-77, mTimestampNanos=9131381350855} 
07-14 15:16:38.400 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-72, mTimestampNanos=9131563194344} 
07-14 15:16:38.581 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-84, mTimestampNanos=9131744007105} 
07-14 15:16:38.637 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=C3:77:13:2D:C1:64, mScanRecord=ScanRecord [mAdvertiseFlags=4, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -71, 64, 127, 48, -11, -8, 70, 110, -81, -7, 37, 85, 107, 87, -2, 109, 18, 52, 26, 84, -61]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-44, mTimestampNanos=9131799923198} 
07-14 15:16:38.766 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-73, mTimestampNanos=9131928391948} 
07-14 15:16:39.502 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-78, mTimestampNanos=9132664990021} 
07-14 15:16:39.686 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-79, mTimestampNanos=9132848987104} 
07-14 15:16:40.600 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-78, mTimestampNanos=9133762614812} 
07-14 15:16:40.651 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=C3:77:13:2D:C1:64, mScanRecord=ScanRecord [mAdvertiseFlags=4, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -71, 64, 127, 48, -11, -8, 70, 110, -81, -7, 37, 85, 107, 87, -2, 109, 18, 52, 26, 84, -61]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-45, mTimestampNanos=9133814144396} 
07-14 15:16:40.782 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-79, mTimestampNanos=9133944237885} 
07-14 15:16:40.974 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-80, mTimestampNanos=9134136730854} 
07-14 15:16:41.332 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9134494395020} 
07-14 15:16:41.524 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9134682050593} 
07-14 15:16:41.662 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=C3:77:13:2D:C1:64, mScanRecord=ScanRecord [mAdvertiseFlags=4, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -71, 64, 127, 48, -11, -8, 70, 110, -81, -7, 37, 85, 107, 87, -2, 109, 18, 52, 26, 84, -61]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-45, mTimestampNanos=9134822143301} 
07-14 15:16:41.696 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-81, mTimestampNanos=9134858870749} 
07-14 15:16:42.250 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-77, mTimestampNanos=9135411394030} 
07-14 15:16:42.431 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-76, mTimestampNanos=9135593807832} 
07-14 15:16:42.616 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9135778420332} 
07-14 15:16:42.797 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-68, mTimestampNanos=9135959398822} 
07-14 15:16:43.530 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-69, mTimestampNanos=9136692165853} 
07-14 15:16:43.668 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=C3:77:13:2D:C1:64, mScanRecord=ScanRecord [mAdvertiseFlags=4, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -71, 64, 127, 48, -11, -8, 70, 110, -81, -7, 37, 85, 107, 87, -2, 109, 18, 52, 26, 84, -61]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-46, mTimestampNanos=9136829981686} 
07-14 15:16:43.714 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-82, mTimestampNanos=9136876451113} 
07-14 15:16:43.894 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-80, mTimestampNanos=9137056543301} 
07-14 15:16:44.447 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-82, mTimestampNanos=9137610074186} 
07-14 15:16:44.631 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-78, mTimestampNanos=9137794141842} 
07-14 15:16:44.675 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=C3:77:13:2D:C1:64, mScanRecord=ScanRecord [mAdvertiseFlags=4, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -71, 64, 127, 48, -11, -8, 70, 110, -81, -7, 37, 85, 107, 87, -2, 109, 18, 52, 26, 84, -61]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-46, mTimestampNanos=9137836412311} 
07-14 15:16:44.815 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-77, mTimestampNanos=9137977876790} 
07-14 15:16:45.185 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-77, mTimestampNanos=9138347487363} 
07-14 15:16:45.368 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-73, mTimestampNanos=9138530690487} 
07-14 15:16:45.552 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-86, mTimestampNanos=9138714656789} 
07-14 15:16:45.731 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-71, mTimestampNanos=9138893700487} 
07-14 15:16:46.105 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-87, mTimestampNanos=9139266595748} 
07-14 15:16:46.280 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-76, mTimestampNanos=9139442061164} 
07-14 15:16:46.459 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-95, mTimestampNanos=9139622150747} 
07-14 15:16:46.624 13592-13612/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=88:0F:10:0B:E1:56, mScanRecord=ScanRecord [mAdvertiseFlags=5, mServiceUuids=[0000fee0-0000-1000-8000-00805f9b34fb, 0000fee7-0000-1000-8000-00805f9b34fb], mManufacturerSpecificData={343=[0, -124, 89, -111, -77, -104, -1, -74, -66, -93, -112, -23, -14, 84, 106, -100, 113, 1, -120, 15, 16, 11, -31, 86]}, mServiceData={0000fee0-0000-1000-8000-00805f9b34fb=[7, 15, 0, 0]}, mTxPowerLevel=-2147483648, mDeviceName=MI1A], mRssi=-98, mTimestampNanos=9139786484185} 
07-14 15:16:46.643 13592-13608/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=66:53:46:55:01:96, mScanRecord=ScanRecord [mAdvertiseFlags=26, mServiceUuids=null, mManufacturerSpecificData={76=[16, 3, 26, 0, 0]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-83, mTimestampNanos=9139805356893} 
07-14 15:16:46.684 13592-13609/com.mobium1182.app D/BluetoothLeScanner: onScanResult() - ScanResult{mDevice=C3:77:13:2D:C1:64, mScanRecord=ScanRecord [mAdvertiseFlags=4, mServiceUuids=null, mManufacturerSpecificData={76=[2, 21, -71, 64, 127, 48, -11, -8, 70, 110, -81, -7, 37, 85, 107, 87, -2, 109, 18, 52, 26, 84, -61]}, mServiceData={}, mTxPowerLevel=-2147483648, mDeviceName=null], mRssi=-45, mTimestampNanos=9139845815695} 
07-14 15:16:46.867 13592-13592/com.mobium1182.app D/BluetoothAdapter: stopLeScan() 

Я думаю, что mDevice = C3: 77: 13: 2D: C1: 64 - мой маяк. Проблема в том, что функция didEnterRegion() не обнаруживает его

P.S. Я уже пытался изменить BackgroundBetweenScanPeriod и отключить AndroidLScanning

BeaconManager beaconManager = BeaconManager.getInstanceForApplication(this); 
BeaconManager.setAndroidLScanningDisabled(true); 
beaconManager.setBackgroundBetweenScanPeriod(10000L); 

Мой Android версии 5.0.2

ответ

0

Я нашел свою ошибку. Я просто добавляю макет в Beacon Manager, и теперь он работает.

beaconManager.getBeaconParsers().add(new BeaconParser().setBeaconLayout(BeaconLayout.IBEACON.layout())); 

И это мое расположение

public enum BeaconLayout { 

    IBEACON("m:2-3=0215,i:4-19,i:20-21,i:22-23,p:24-24"); 

    private final String layout; 

    BeaconLayout(String layout) { 
     this.layout = layout; 
    } 

    public String layout() { 
     return layout; 
    } 

} 
0

Я подозреваю, что код, используемый для выполнения переднего плана обработки (который работает в соответствии с вопроса) может быть отключение обнаружение фона. Это может быть полезно, если вы покажете информацию о том, как настроено определение переднего плана. Использует ли этот код код, показанный в классе Application? Или он устанавливает это отдельно в Activity?

Несколько советов:

  • При использовании BootstrapNotifier, убедитесь, что вы не звоните beaconManager.setMonitorNotifier(...) позже в вашем коде. Это эффективно отключит обнаружение фона.

  • Если выше не помогает, вы можете попробовать установить beaconManager.setDebug(true) и захватить новый протоколирования отрывок, который показывает более подробную информацию о том, что происходит, когда устройство сканируется в фоновом режиме, но вы не получите BootstrapNotifier обратных вызовов.

+0

Спасибо за ваш ответ. Теперь я удалил любой маяковый код из переднего плана, потому что он не нужен на переднем плане. Это моя ошибка? –

Смежные вопросы