2014-03-13 4 views
1

,응용 프로그램 클래스에서 iBeacon 소스의 UUID를 두 개 이상 검색하는 방법은 무엇입니까? 프로 라이브러리를 사용

Region region = new Region("com.radiusnetworks.androidproximityreference.backgroundRegion", 
       "2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6", null, null); 
     regionBootstrap = new RegionBootstrap(this, region); 

그것은 단지 하나의 UUID를 받아 들일 수 있습니다.
그러나 더 많은 UUID를 검색하려면 어떻게해야합니까?

+0

하나 이상의 UUID를 검색해야하는 이유는 무엇입니까? –

+0

어쩌면 내가 다른 작업을 취할 수 있도록 ibeacon 소스의 목록을 가지고 다른 UUID에 따라 달라집니다. – jjLin

+0

맞춤형 Android 구현은 원하는 수의 UUID를 감지 할 수 있지만 전체 시스템을 설계 할 때 악의적 인 20 가지 UOS 제한을 염두에 두어야합니다. 즉, 광범위한 카테고리에 대해 적은 수의 UUID를 사용하지만 대부분의 차별화는 각 UUID 내의 메이저/마이너 필드 –

답변

1

지역 개체 목록을 전달할 수있는 대체 생성자가 있습니다. 다음 코드를 사용해보십시오.

Region region1 = new Region("com.radiusnetworks.androidproximityreference.backgroundRegion1", 
      "2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6", null, null); 
Region region2 = new Region("com.radiusnetworks.androidproximityreference.backgroundRegion2", 
      "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0", null, null); 
ArrayList regionList = new ArrayList<Region>(); 
regionList.add(region1); 
regionList.add(region2); 
regionBootstrap = new RegionBootstrap(this, regionList); 

javadocs here을 참조하십시오.