xamarin - iBeacon ranging, Android, Minor always the same -
i've made app android detects ibeacons. it's based on 'find monkey example uses ibeacon library radius networks.
the app has been working fine until morning when started recognise 1 of beacons (i have maybe 6 in office).
the code loops through familiar have played ibeacons:
void rangingbeaconsinregion(object sender, rangeeventargs e) { if (e.beacons.count > 0) { var beacon = e.beacons.firstordefault(); var minor = beacon.minor; console.writeline ("minor .... " + minor); switch((proximitytype)beacon.proximity) { case proximitytype.immediate: console.writeline ("beacon fired minor " + minor); showcouponmessage(); break; case proximitytype.near: updatedisplay ("you're getting warmer (near)", color.lawngreen); break; case proximitytype.far: updatedisplay("no beacons here (far)!!", color.blue); break; case proximitytype.unknown: updatedisplay("i'm not sure how close beacon (unknown)", color.red); break; }
when stopped working, added console.writeline statement try understand beacon picking , why wasn't seeing others. looking @ console window, appears in fact 'see' other beacon's major , minor ids, chooses identify beacon minor of '2'.
here's section of output window:
[ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :f7826da6-4fa2-4e98-8024-bc5b71e0893e 742 32001 accuracy: 1.440510248595126 proximity: 2 [ibeaconservice] ibeacon detected multiple times in scan cycle :f7826da6-4fa2-4e98-8024-bc5b71e0893e 14640 7849 accuracy: 5.0375909818338265 proximity: 3 [callback] attempting callback via intent: componentinfo{com.findthemonkey_android/com.radiusnetworks.ibeacon.ibeaconintentprocessor} [bluetoothadapter] stoplescan() [bluetoothadapter] startlescan(): null [bluetoothadapter] onclientregistered() - status=0 clientif=6 thread started: #15 minor .... 2 thread finished: #15 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :f7826da6-4fa2-4e98-8024-bc5b71e0893e 14640 7849 accuracy: 2.629927091577368 proximity: 2 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :f7826da6-4fa2-4e98-8024-bc5b71e0893e 742 34001 accuracy: 0.6951160689284792 proximity: 2 [callback] attempting callback via intent: componentinfo{com.findthemonkey_android/com.radiusnetworks.ibeacon.ibeaconintentprocessor} [bluetoothadapter] stoplescan() [bluetoothadapter] startlescan(): null [bluetoothadapter] onclientregistered() - status=0 clientif=6 thread started: #16 minor .... 2 thread finished: #16 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :f7826da6-4fa2-4e98-8024-bc5b71e0893e 14640 7849 accuracy: 2.629927091577368 proximity: 2 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [callback] attempting callback via intent: componentinfo{com.findthemonkey_android/com.radiusnetworks.ibeacon.ibeaconintentprocessor} [bluetoothadapter] stoplescan() [bluetoothadapter] startlescan(): null [bluetoothadapter] onclientregistered() - status=0 clientif=6 thread started: #17 minor .... 2 thread finished: #17 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [callback] attempting callback via intent: componentinfo{com.findthemonkey_android/com.radiusnetworks.ibeacon.ibeaconintentprocessor} [bluetoothadapter] stoplescan() [bluetoothadapter] startlescan(): null [bluetoothadapter] onclientregistered() - status=0 clientif=6 thread started: #18 thread finished: #18 minor .... 2 [ibeaconservice] ibeacon detected multiple times in scan cycle :f7826da6-4fa2-4e98-8024-bc5b71e0893e 14640 7849 accuracy: 5.447335444796175 proximity: 3 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :00000000-0000-0000-0000-000000000000 0 0 accuracy: -1.0 proximity: 0 [ibeaconservice] ibeacon detected multiple times in scan cycle :f7826da6-4fa2-4e98-8024-bc5b71e0893e 742 32001 accuracy: 1.440510248595126 proximity: 2 [callback] attempting callback via intent: componentinfo{com.findthemonkey_android/com.radiusnetworks.ibeacon.ibeaconintentprocessor} [bluetoothadapter] stoplescan() [bluetoothadapter] startlescan(): null [bluetoothadapter] onclientregistered() - status=0 clientif=6 thread started: #19 minor .... 2
as can see, 'see' beacons other minors, seems want identify 1 beacon have minor of '2' , continually outputs console window.
any ideas happening here? android bluetooth stack bug? i'm running android 4.4.4 on nexus 4, , thought bug resolved in 4.4.
Comments
Post a Comment