2014-10-07 2 views
0

나는 스캔 장치 ibeacons를 사용하는 여러 응용 프로그램을 개발하고 있습니다. 각 응용 프로그램마다 다른 스캔 빈도가 있습니다. 내 질문은 거기에 문제가 여러 응용 프로그램을 동시에 검색 할 수 있는지 여부입니다. 블루투스 장치를 쌓아 올리기위한 액세스 프로토콜은 무엇입니까?iBeacon 동시에 검색 (안드로이드 애플 리케이션)

또한 정기적 인 스캔을 수행하는 백그라운드에서 실행되는 서비스가 있으며 테스트 한 모든 장치에서 새로운 Moto X를 제외하고 응용 프로그램이 제대로 작동합니다. 응용 프로그램이 차단되어 스캔을 수행하지 않습니다. 어떤 아이디어?

미리 감사드립니다!

답변

4

Android Beacon Library은 여러 응용 프로그램이 서로 간섭하지 않고 비컨을 동시에 검색 할 수 있도록합니다. 이것은 Android BLE 검색 API가 어떤 앱이 검색을 수행하고 있는지 추적하기 때문에 작동합니다. 응용 프로그램 A와 B가 모두 스캔을 시작하고 응용 프로그램 B가 스캔을 중지하면 운영 체제는 스캔을 계속하고 응용 프로그램 A로 결과를 보냅니다.

이 점을 증명하기 위해 BeaconReferenceApplication의 두 가지 복사본을 Moto G Android 4.4.3 실행. 응용 프로그램 패키지 이름은 동시 설치가 가능하도록 약간 수정되었으며 응용 프로그램 A에서는 5 초 켜짐/꺼짐, 응용 프로그램 B에서는 10 초 켜짐/꺼짐으로 설정되었습니다. 응용 프로그램 사용자 지정 내용은 아래와 같습니다. 나는 동시에 백그라운드에서이 두 응용 프로그램을 실행하면 응용 프로그램

long scanPeriod = 10000l; 
long betweenScanPeriod = 10000l; 
mBeaconManager.setBackgroundBetweenScanPeriod(scanPeriod); 
mBeaconManager.setBackgroundScanPeriod(betweenScanPeriod); 
Log.d(TAG, "Looking for beacon with minor 12345, with a scan on/off cycle of "+scanPeriod+"/"+betweenScanPeriod+" milliseconds"); 

응용 프로그램 B는

long scanPeriod = 5000l; 
long betweenScanPeriod = 5000l; 
mBeaconManager.setBackgroundBetweenScanPeriod(scanPeriod); 
mBeaconManager.setBackgroundScanPeriod(betweenScanPeriod); 
Log.d(TAG, "Looking for beacon with minor 12345, with a scan on/off cycle of "+scanPeriod+"/"+betweenScanPeriod+" milliseconds"); 

, 응용 프로그램 A는 성공적 만 성공적으로도 응용 프로그램 B 불구하고, 직선 10 초 동안 비콘을 감지 멈추기 직전의 5 초 동안 탐지 된 비컨. 응용 프로그램 B 중지 검사는 응용 프로그램 A에 영향을주지 않습니다. 아래 로그 출력에서 ​​직접 결과를 볼 수 있습니다. (응용 프로그램 A는 프로세스 ID가 15841이고 응용 프로그램 B는 프로세스 ID가 15910 임).

이러한 테스트는 Moto G에서 수행되었지만 Moto X는 고급 하드웨어를 갖춘 동일한 장치의 버전 일 뿐이므로 Moto X에서 다른 결과를 얻는 것은 의심 스럽습니다. 따라서 귀하가보고있는 문제가 애플리케이션 별 문제 일 수 있다고 생각됩니다. 다른 주목할 점은 Moto X와 Moto G는 Bluetooth와 WiFi가 동시에 제대로 작동하지 않는 하드웨어 문제가 있다는 것입니다. 비콘을 검색하는 것과 동시에 WiFi를 사용하는 경우 탐지를 차단하면 놀라지 마십시오.

10-07 13:29:05.949 D/BeaconReferenceApplication(15841): Looking for beacon with minor 12345, with a scan on/off cycle of 10000/10000 milliseconds 
10-07 13:29:09.071 D/BeaconReferenceApplication(15910): Looking for beacon with minor 12345, with a scan on/off cycle of 5000/5000 milliseconds 
... 
10-07 13:29:15.582 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:16.119 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:16.738 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:16.942 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:17.072 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:17.250 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:17.372 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:17.375 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:17.660 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:17.660 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:18.075 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:18.080 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:18.289 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:18.297 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:18.501 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:18.513 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:18.820 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:18.822 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:19.035 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:19.040 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:19.438 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:19.441 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:19.540 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:19.542 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:19.643 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:19.644 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:20.699 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:20.910 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:21.125 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:21.239 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:21.344 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:21.462 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:21.751 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:21.969 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:22.170 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:23.016 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:23.129 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:23.340 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:23.444 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:23.654 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:24.180 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:24.818 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:25.012 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:25.113 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:25.245 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:25.424 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:25.527 D/BeaconService(15841): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
10-07 13:29:26.353 D/BeaconService(15910): beacon detected :id1: e2c56db5-dffb-48d2-b060-d0f5a71096e0 id2: 1 id3: 12345 
+1

환상적인 응답 !! 감사!! :) –

관련 문제