Does the AprilBrother library for Android ignore an iBeacon under certain conditions?

#1

Hi,

I have been using the Android library from AprilBrother. The firmware upgrade recommended in Is it possible to further reduce the transmission power? has been done. Now the RSSI values look correct.

I noticed that once in a while, the ranging listener seems to lose one of the beacons. It does not happen every time, and I can only keep the app running, hoping it happens again for me to collect more data. The most recent incident was on yesterday. I had the chance of looking at adb log. The missing beacon concerned was detected by BluetoothAdapter::onScanResult(). I could see its MAC address correctly printed out in BluetoothAdapter logs. However, the beacon did not seem to be passed to the ranging listener.

For information, I had one ranging listener, and two filtering UUIDs. There were two beacons. Each beacon had a different UUID. The missing beacon was detected by BluetoothAdapter but not passed to the ranging listener. The other beacon was passed to the ranging listener. This did not recover by itself. I restarted the app after observing the logs for many minutes, then both beacons were seen by the ranging listener again.

I have added more log statements, and am waiting for it to happen again to do a better analysis. At the meantime, since AprilBrother has the source code of the library, are you able to see any place in the code that can result in a beacon detected by BluetoothAdapter, but discarded by the library?

Thanks.

#2

A beacon detected by BluetoothAdapter, but discarded by the library, may be the detect scan result of the beacon not broadcast iBeacon model,perhaps it detect the result of the beacon broadcast eddystone model or url model,
Which app did you used to test ?
Have you change the broadcast model of the beacon ?

#3

I have managed to encounter it again and obtain more information.

The beacon configurations :



Advertising interval is not shown in the screenshots above. It is 5 for both beacons.

The adb log shows the beacon with MAC address …DF was detected, but only …F4 was passed to the ranging listener. BeaconSiteCache logs the exact beacon list received by the ranging listener. It is my Android app with the ab-sdk-beta1.6.2.jar library.

Log to follow…

#4

D/BluetoothAdapter( 1222): startLeScan(): null
D/BtGatt.GattService(21111): registerClient() - UUID=34aef3a1-854f-4191-b514-1eedb0699803
D/BtGatt.btif(21111): btif_gattc_register_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1000
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 0
D/BtGatt.GattService(21111): onClientRegistered() - UUID=34aef3a1-854f-4191-b514-1eedb0699803, clientIf=5
D/BluetoothAdapter( 1222): onClientRegistered() - status=0 clientIf=5
D/BtGatt.GattService(21111): startScan() - queue=0
D/BtGatt.GattService(21111): startScan() - adding client=5
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1002
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=0
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:DF, rssi=-96
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:DF RSSI=-96
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:DF, rssi=-95
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:DF RSSI=-95
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=1
D/BtGatt.btif(21111): btif_gattc_update_properties BLE device name=abeacon_55F4 len=12 dev_type=2
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-78
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-78
D/BluetoothAdapter( 1222): stopLeScan()
D/BtGatt.GattService(21111): stopScan() - queue=1
D/BtGatt.GattService(21111): stopScan() - queue empty; stopping scan
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1003
D/BtGatt.GattService(21111): unregisterClient() - clientIf=5
D/BtGatt.btif(21111): btif_gattc_unregister_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1001
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 1
I/BeaconSiteCache( 1222): getNearbySiteList() is given this detectedBeaconList : [Beacon{macAddress=12:3B:6A:1A:55:F4, proximityUUID=70617472-6f6c-6974-7920-320000000000, major=10, minor=22004, measuredPower=-59, rssi=-72}]
D/BluetoothAdapter( 1222): startLeScan(): null
D/BtGatt.GattService(21111): registerClient() - UUID=c668671f-e624-4528-ac91-07524bd4cb42
D/BtGatt.btif(21111): btif_gattc_register_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1000
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 0
D/BtGatt.GattService(21111): onClientRegistered() - UUID=c668671f-e624-4528-ac91-07524bd4cb42, clientIf=5
D/BluetoothAdapter( 1222): onClientRegistered() - status=0 clientIf=5
D/BtGatt.GattService(21111): startScan() - queue=0
D/BtGatt.GattService(21111): startScan() - adding client=5
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1002
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=0
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-71
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-71
D/BluetoothAdapter( 1222): stopLeScan()
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=1
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:DF, rssi=-98
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:DF RSSI=-98
D/BtGatt.GattService(21111): stopScan() - queue=1
D/BtGatt.GattService(21111): stopScan() - queue empty; stopping scan
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.GattService(21111): unregisterClient() - clientIf=5
D/BtGatt.btif(21111): btif_gattc_unregister_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1003
D/BtGatt.btif(21111): btgattc_handle_event: Event 1001
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 1
I/BeaconSiteCache( 1222): getNearbySiteList() is given this detectedBeaconList : [Beacon{macAddress=12:3B:6A:1A:55:F4, proximityUUID=70617472-6f6c-6974-7920-320000000000, major=10, minor=22004, measuredPower=-59, rssi=-71}]
D/BluetoothAdapter( 1222): startLeScan(): null
D/BtGatt.GattService(21111): registerClient() - UUID=9bd88536-e27d-4721-92ab-675dd83d061b
D/BtGatt.btif(21111): btif_gattc_register_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1000
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 0
D/BtGatt.GattService(21111): onClientRegistered() - UUID=9bd88536-e27d-4721-92ab-675dd83d061b, clientIf=5
D/BluetoothAdapter( 1222): onClientRegistered() - status=0 clientIf=5
D/BtGatt.GattService(21111): startScan() - queue=0
D/BtGatt.GattService(21111): startScan() - adding client=5
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1002
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=0
D/BtGatt.btif(21111): btif_gattc_update_properties BLE device name=abeacon_55F4 len=12 dev_type=2
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-79
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-79
D/BluetoothAdapter( 1222): stopLeScan()
D/BtGatt.GattService(21111): stopScan() - queue=1
D/BtGatt.GattService(21111): stopScan() - queue empty; stopping scan
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1003
D/BtGatt.GattService(21111): unregisterClient() - clientIf=5
D/BtGatt.btif(21111): btif_gattc_unregister_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1001
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 1
I/BeaconSiteCache( 1222): getNearbySiteList() is given this detectedBeaconList : [Beacon{macAddress=12:3B:6A:1A:55:F4, proximityUUID=70617472-6f6c-6974-7920-320000000000, major=10, minor=22004, measuredPower=-59, rssi=-71}]
D/BluetoothAdapter( 1222): startLeScan(): null
D/BtGatt.GattService(21111): registerClient() - UUID=89257d76-412c-4ac2-a1b4-18dd131cceb3
D/BtGatt.btif(21111): btif_gattc_register_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1000
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 0
D/BtGatt.GattService(21111): onClientRegistered() - UUID=89257d76-412c-4ac2-a1b4-18dd131cceb3, clientIf=5
D/BluetoothAdapter( 1222): onClientRegistered() - status=0 clientIf=5
D/BtGatt.GattService(21111): startScan() - queue=0
D/BtGatt.GattService(21111): startScan() - adding client=5
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1002
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=0
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-80
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-80
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-80
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-80
D/BluetoothAdapter( 1222): stopLeScan()
D/BtGatt.GattService(21111): stopScan() - queue=1
D/BtGatt.GattService(21111): stopScan() - queue empty; stopping scan
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1003
D/BtGatt.GattService(21111): unregisterClient() - clientIf=5
D/BtGatt.btif(21111): btif_gattc_unregister_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1001
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 1
I/BeaconSiteCache( 1222): getNearbySiteList() is given this detectedBeaconList : [Beacon{macAddress=12:3B:6A:1A:55:F4, proximityUUID=70617472-6f6c-6974-7920-320000000000, major=10, minor=22004, measuredPower=-59, rssi=-80}]
D/BluetoothAdapter( 1222): startLeScan(): null
D/BtGatt.GattService(21111): registerClient() - UUID=711a0c6b-ac95-4751-b9d5-054baf4e33c6
D/BtGatt.btif(21111): btif_gattc_register_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1000
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 0
D/BtGatt.GattService(21111): onClientRegistered() - UUID=711a0c6b-ac95-4751-b9d5-054baf4e33c6, clientIf=5
D/BluetoothAdapter( 1222): onClientRegistered() - status=0 clientIf=5
D/BtGatt.GattService(21111): startScan() - queue=0
D/BtGatt.GattService(21111): startScan() - adding client=5
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1002
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=0
D/BtGatt.btif(21111): btif_gattc_update_properties BLE device name=abeacon_55F4 len=12 dev_type=2
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-91
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-91
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=1
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:DF, rssi=-97
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:DF RSSI=-97
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-73
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-73
D/BluetoothAdapter( 1222): stopLeScan()
D/BtGatt.GattService(21111): stopScan() - queue=1
D/BtGatt.GattService(21111): stopScan() - queue empty; stopping scan
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1003
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:DF, rssi=-97
D/BtGatt.GattService(21111): unregisterClient() - clientIf=5
D/BtGatt.btif(21111): btif_gattc_unregister_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1001
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 1
I/BeaconSiteCache( 1222): getNearbySiteList() is given this detectedBeaconList : [Beacon{macAddress=12:3B:6A:1A:55:F4, proximityUUID=70617472-6f6c-6974-7920-320000000000, major=10, minor=22004, measuredPower=-59, rssi=-73}]
D/BluetoothAdapter( 1222): startLeScan(): null
D/BtGatt.GattService(21111): registerClient() - UUID=2ea8bbe1-bfe5-4a45-a172-6416b9739907
D/BtGatt.btif(21111): btif_gattc_register_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1000
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 0
D/BtGatt.GattService(21111): onClientRegistered() - UUID=2ea8bbe1-bfe5-4a45-a172-6416b9739907, clientIf=5
D/BluetoothAdapter( 1222): onClientRegistered() - status=0 clientIf=5
D/BtGatt.GattService(21111): startScan() - queue=0
D/BtGatt.GattService(21111): startScan() - adding client=5
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1002
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=0
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-78
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-78
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-80
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-80
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=1
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:DF, rssi=-95
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:DF RSSI=-95
D/BluetoothAdapter( 1222): stopLeScan()
D/BtGatt.GattService(21111): stopScan() - queue=1
D/BtGatt.GattService(21111): stopScan() - queue empty; stopping scan
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1003
D/BtGatt.GattService(21111): unregisterClient() - clientIf=5
D/BtGatt.btif(21111): btif_gattc_unregister_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1001
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 1
I/BeaconSiteCache( 1222): getNearbySiteList() is given this detectedBeaconList : [Beacon{macAddress=12:3B:6A:1A:55:F4, proximityUUID=70617472-6f6c-6974-7920-320000000000, major=10, minor=22004, measuredPower=-59, rssi=-78}]
D/BluetoothAdapter( 1222): startLeScan(): null
D/BtGatt.GattService(21111): registerClient() - UUID=be3fef1a-0bfc-4a28-80c8-e9b2cc8123ad
D/BtGatt.btif(21111): btif_gattc_register_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1000
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 0
D/BtGatt.GattService(21111): onClientRegistered() - UUID=be3fef1a-0bfc-4a28-80c8-e9b2cc8123ad, clientIf=5
D/BluetoothAdapter( 1222): onClientRegistered() - status=0 clientIf=5
D/BtGatt.GattService(21111): startScan() - queue=0
D/BtGatt.GattService(21111): startScan() - adding client=5
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1002
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=0
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:DF, rssi=-96
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:DF RSSI=-96
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=1
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-73
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-73
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-72
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-72
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:F4, rssi=-86
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:F4 RSSI=-86
D/BluetoothAdapter( 1222): stopLeScan()
D/BtGatt.GattService(21111): stopScan() - queue=1
D/BtGatt.GattService(21111): stopScan() - queue empty; stopping scan
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1003
D/BtGatt.GattService(21111): unregisterClient() - clientIf=5
D/BtGatt.btif(21111): btif_gattc_unregister_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1001
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 1
I/BeaconSiteCache( 1222): getNearbySiteList() is given this detectedBeaconList : [Beacon{macAddress=12:3B:6A:1A:55:F4, proximityUUID=70617472-6f6c-6974-7920-320000000000, major=10, minor=22004, measuredPower=-59, rssi=-73}]
D/BluetoothAdapter( 1222): startLeScan(): null
D/BtGatt.GattService(21111): registerClient() - UUID=19d3c660-7b7b-45e9-ac55-2f6eefcce6ff
D/BtGatt.btif(21111): btif_gattc_register_app
D/BtGatt.btif(21111): btgattc_handle_event: Event 1000
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 0
D/BtGatt.GattService(21111): onClientRegistered() - UUID=19d3c660-7b7b-45e9-ac55-2f6eefcce6ff, clientIf=5
D/BluetoothAdapter( 1222): onClientRegistered() - status=0 clientIf=5
D/BtGatt.GattService(21111): startScan() - queue=0
D/BtGatt.GattService(21111): startScan() - adding client=5
D/BtGatt.btif(21111): btif_gattc_scan
D/BtGatt.btif(21111): btgattc_handle_event: Event 1002
D/BtGatt.btif(21111): btif_gattc_upstreams_evt: Event 4096
D/BtGatt.btif(21111): btif_gattc_add_remote_bdaddr device added idx=0
D/BtGatt.GattService(21111): onScanResult() - address=12:3B:6A:1A:55:DF, rssi=-98
D/BluetoothAdapter( 1222): onScanResult() - Device=12:3B:6A:1A:55:

#5

Did you use the AprilBeaconDemos for this test, have you change the Region if you startRanging(Region) it will find the match the region’s beacon.
Can i get the code of your start ranging

#6

The AprilBrother app could see both beacons when this happened in my app, as shown in the screeenshots above.

Here are the code fragments that start and stop ranging :

private void initScan () {
	this.manager = new BeaconManager (this);

	this.manager.connect (new BeaconManager.ServiceReadyCallback () {
		@Override
		public void onServiceReady () {
			continueInitScan ();
		}
	});
}


private void continueInitScan () {
	Region region;


	this.manager.setRangingListener (new BeaconManager.RangingListener () {
		@Override
		public void onBeaconsDiscovered (Region paramRegion, List<Beacon> paramList) {
			processBeacons (paramList);
		}
	});

	region = new Region ("dummy region 1", "70617472-6f6c-6974-7920-310000000000", null, null);

	try {
		this.manager.startRanging (region);
	} catch (Exception exception) {
		Log.e (TAG, "Cannot start ranging beacon of UUID 70617472-6f6c-6974-7920-310000000000", exception);
	}

	region = new Region ("dummy region 2", "70617472-6f6c-6974-7920-320000000000", null, null);

	try {
		this.manager.startRanging (region);
	} catch (Exception exception) {
		Log.e (TAG, "Cannot start ranging beacon of UUID 70617472-6f6c-6974-7920-320000000000", exception);
	}
}


protected void endScan () {
	Region region;


	if (this.manager != null) {
		region = new Region ("dummy region 1", "70617472-6f6c-6974-7920-310000000000", null, null);

		try {
			this.manager.stopRanging (region);
		} catch (Exception exception) {
			Log.e (TAG, "Cannot stop ranging beacon of UUID 70617472-6f6c-6974-7920-310000000000", exception);
		}

		region = new Region ("dummy region 2", "70617472-6f6c-6974-7920-320000000000", null, null);

		try {
			this.manager.stopRanging (region);
		} catch (Exception exception) {
			Log.e (TAG, "Cannot stop ranging beacon of UUID 70617472-6f6c-6974-7920-320000000000", exception);
		}

		this.manager.disconnect ();

		Log.i (TAG, "Beacon rangings stopped, beacon manager disconnected");
	}
}
#7

Only should startRanging once to scan the beacons
try to delete the dummy region 2

#8

Is there a way to do ranging for two or more UUIDs at the same time? Because the system has to cater to the possibility of the major and minor codes for one UUID being used up, and so has to allocate new UUIDs while still handling the old ones.

#9

If you wan’t to ranging two or more UUIDs you can set the Region(“region name”,null,null.null)
it will ranging all UUIDs