Having trouble with AprilBeacon Android SDK


#1

Hi everyone, I’m developing a basic demo Android mobile app that scans for nearby beacons and log the beacon’s info in Logcat. I’ve followed the instructions on AprilBeacons SDK Github page and copied all of the code from the AprilBeacons SDK Demo app’s source code. Having done all of the above, I am still not able to scan for any of the AprilBeacon EEK beacons that I have with me. I have tested the AprilBeacons with the Demo App located in AprilBeacon’s Github bin folder and they are showing in the demo app.

This is the log I received when running my app with the beacons directly beside my android mobile device.

09-21 15:51:37.871 30004-30004/com.example.aprilbeacondemo I/BeaconList: connectToService
09-21 15:51:37.885 30004-30078/com.example.aprilbeacondemo D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
09-21 15:51:37.905 30004-30004/com.example.aprilbeacondemo I/AprilBrotherSDK: Creating service
09-21 15:51:37.939 30004-30078/com.example.aprilbeacondemo I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36
09-21 15:51:37.942 30004-30078/com.example.aprilbeacondemo I/OpenGLRenderer: Initialized EGL, version 1.4
09-21 15:51:37.988 30004-30004/com.example.aprilbeacondemo I/BeaconList: connectToService
09-21 15:51:37.991 30004-30004/com.example.aprilbeacondemo D/BluetoothAdapter: startLeScan(): null
09-21 15:51:37.995 30004-30004/com.example.aprilbeacondemo D/BluetoothAdapter: STATE_ON
09-21 15:51:38.001 30004-30015/com.example.aprilbeacondemo D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=6
09-21 15:51:38.085 30004-30090/com.example.aprilbeacondemo V/AprilBrotherSDK: Start ranging: Region{identifier=apr, proximityUUID=null, major=null, minor=null}
09-21 15:51:38.086 30004-30090/com.example.aprilbeacondemo D/BluetoothAdapter: startLeScan(): null
09-21 15:51:38.087 30004-30090/com.example.aprilbeacondemo D/BluetoothAdapter: STATE_ON
09-21 15:51:38.096 30004-30015/com.example.aprilbeacondemo D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=7
09-21 15:51:38.098 30004-30091/com.example.aprilbeacondemo V/AprilBrotherSDK: Starting monitoring: Region{identifier=apr, proximityUUID=null, major=null, minor=null}
09-21 15:51:38.100 30004-30091/com.example.aprilbeacondemo D/AprilBrotherSDK: Scanning already in progress, not starting one more
09-21 15:51:39.119 30004-30079/com.example.aprilbeacondemo E/AprilBrotherSDK: setAlarm
09-21 15:51:39.121 30004-30079/com.example.aprilbeacondemo D/BluetoothAdapter: stopLeScan()
09-21 15:51:39.123 30004-30079/com.example.aprilbeacondemo D/BluetoothAdapter: STATE_ON
09-21 15:51:39.132 30004-30079/com.example.aprilbeacondemo E/AprilBrotherSDK: beaconsFoundInScanCycle.size = 0
09-21 15:51:39.142 30004-30079/com.example.aprilbeacondemo D/BluetoothAdapter: startLeScan(): null
09-21 15:51:39.145 30004-30079/com.example.aprilbeacondemo D/BluetoothAdapter: STATE_ON
09-21 15:51:39.151 30004-30015/com.example.aprilbeacondemo D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=7
09-21 15:51:40.190 30004-30079/com.example.aprilbeacondemo E/AprilBrotherSDK: setAlarm
09-21 15:51:40.193 30004-30079/com.example.aprilbeacondemo D/BluetoothAdapter: stopLeScan()
09-21 15:51:40.195 30004-30079/com.example.aprilbeacondemo D/BluetoothAdapter: STATE_ON
09-21 15:51:40.199 30004-30079/com.example.aprilbeacondemo E/AprilBrotherSDK: beaconsFoundInScanCycle.size = 0
09-21 15:51:40.201 30004-30079/com.example.aprilbeacondemo D/BluetoothAdapter: startLeScan(): null
09-21 15:51:40.202 30004-30079/com.example.aprilbeacondemo D/BluetoothAdapter: STATE_ON
09-21 15:51:40.206 30004-30016/com.example.aprilbeacondemo D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=7
09-21 15:51:41.264 30004-30010/com.example.aprilbeacondemo W/art: Suspending all threads took: 7.965ms
09-21 15:51:41.275 30004-30225/com.example.aprilbeacondemo V/AprilBrotherSDK: Stopping ranging: apr
09-21 15:51:41.277 30004-30225/com.example.aprilbeacondemo D/BluetoothAdapter: stopLeScan()
09-21 15:51:41.280 30004-30079/com.example.aprilbeacondemo E/AprilBrotherSDK: setAlarm
09-21 15:51:41.280 30004-30225/com.example.aprilbeacondemo D/BluetoothAdapter: STATE_ON
09-21 15:51:41.321 30004-30004/com.example.aprilbeacondemo I/AprilBrotherSDK: Service destroyed
09-21 15:51:41.334 30004-30004/com.example.aprilbeacondemo D/BluetoothAdapter: stopLeScan()
09-21 15:51:41.336 30004-30004/com.example.aprilbeacondemo D/BluetoothAdapter: scan not started yet

Anyone has any idea on what the problem is? Also, are there are tutorials that I should be following to be able to scan for AprilBeacons?


#2

Have you change the code of demo ?


#3

No, I have not. Is there anything in specific that I have to change in order for the demo source code to function like the demo app?


#4

Have a try to restart the bluetooth


#5

Yes, I have tried restarting the bluetooth, location & device but to no avail. The beacons only showed up in the demo app… Are there any tutorials that exist on how to use the April beacon Android sdk to scan for april beacons or would the code here suffice?