public class RECOBeaconRegion
extends java.lang.Object
implements android.os.Parcelable
startMonitoringForRegion: receive notifications when you enter or exit the vicinity of a beacon startRangingBeaconsInRegion: receive notifications when the relative distance to the beacon changes while a beacon is in range
RECOBeaconRegion 클래스는 기기가 beacon에 얼마나 근접했는지에 기반하여 region을 정의합니다.
Region은 사용자가 입력한 정보와 매칭되는 beacon을 찾습니다.
매칭되는 beacon이 탐지되면 적합한 callback 메소드를 통해 전달합니다.
Region을 탐색하는 방법은 두 가지가 있습니다.
startMonitoringForRegion: beacon의 근처에 가까워졌거나 멀어졌을 때 알림을 받음 startRangingBeaconsInRegion: beacon이 근처에 있을 때, beacon에 대한 상대적인 위치가 변경될 때마다 알림을 받음| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<RECOBeaconRegion> |
CREATOR |
| Constructor and Description |
|---|
RECOBeaconRegion(java.lang.String proximityUuid,
java.lang.Integer major,
java.lang.Integer minor,
java.lang.String uniqueIdentifier)
Create and return a region object that targets a beacon with the given proximity uuid, major value and minor value.
|
RECOBeaconRegion(java.lang.String proximityUuid,
java.lang.Integer major,
java.lang.String uniqueIdentifier)
Create and return a region object that targets a beacon with the given proximity uuid and major value.
|
RECOBeaconRegion(java.lang.String proximityUuid,
java.lang.String uniqueIdentifier)
Create and return a region object that targets a beacon with the given proximity uuid.
|
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
java.lang.Integer |
getMajor()
The value identifying a group of beacons.
|
java.lang.Integer |
getMinor()
The value identifying a specific beacon within a group.
|
boolean |
getNotifyOnEntry()
Method to check whether
didEnterRegion method is called or not when the device is moved from outside to inside the region. |
boolean |
getNotifyOnExit()
Method to check whether
didExitRegion method is called or not when the device is moved from inside to outside the region. |
java.lang.String |
getProximityUuid()
Proximity UUID of beacons being targeted.
|
long |
getRegionExpirationTimeMillis()
Get when
didExitRegion method is called. |
java.lang.String |
getUniqueIdentifier()
Identifier of the RECOBeaconRegion object.
|
int |
hashCode() |
void |
readFromParcel(android.os.Parcel in) |
void |
setNotifyOnEntry(boolean notifyOnEntry)
Set whether
didEnterRegion method is called or not when the device is moved from outside to inside the region. |
void |
setNotifyOnExit(boolean notifyOnExit)
Set whether
didExitRegion method is called or not when the device is moved from inside to outside the region. |
void |
setRegionExpirationTimeMillis(long regionExpirationTimeMillis)
Set when
didExitRegion method is called. |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<RECOBeaconRegion> CREATOR
public RECOBeaconRegion(java.lang.String proximityUuid,
java.lang.String uniqueIdentifier)
이 생성자는 지정된 proximityUUID값을 가지는 모든 beacon을 탐색하는 region을 정의합니다.
탐색한 beacon의 major 값과 minor 값은 무시합니다.
proximityUuid - ProximityUUID of the beacons being targeted. If the value is null or empty, it is set to proximityUUID of RECOBeacon provided by Perples Inc.uniqueIdentifier - A unique identifier to associated with the returned region object. Use this identifier to differentiate regions within your application. This value must not be null.
proximityUuid - 탐색할 beacon의 proximityUUID. null 이거나 아무것도 입력하지 않은 경우, (주)퍼플즈에서 제공하는 RECOBeacon의 proximityUUID가 기본 값으로 설정됩니다.uniqueIdentifier - region 객체에 할당할 unique identifier. 어플리케이션 내에서 다른 region들과 구분하기 위해 이 uniqueIdentifier를 사용합니다. 이 값은 null이 될 수 없습니다.public RECOBeaconRegion(java.lang.String proximityUuid,
java.lang.Integer major,
java.lang.String uniqueIdentifier)
이 생성자는 지정된 proximityUUID값과 major값을 가지는 모든 beacon을 탐색하는 region을 정의합니다.
탐색한 beacon의 minor 값은 무시합니다.
proximityUuid - ProximityUUID of the beacons being targeted. If the value is null or empty, it is set to proximityUUID of RECOBeacon provided by Perples Inc.major - The major value that you use to identify one or more beacons.uniqueIdentifier - A unique identifier to associated with the returned region object. Use this identifier to differentiate regions within your application. This value must not be null.
proximityUuid - 탐색할 beacon의 proximityUUID. null 이거나 아무것도 입력하지 않은 경우, (주)퍼플즈에서 제공하는 RECOBeacon의 proximityUUID가 기본 값으로 설정됩니다.major - 특정 beacon 혹은 특정 beacon 그룹을 구분하기 위해 사용할 major 값.uniqueIdentifier - region 객체에 할당할 unique identifier. 어플리케이션 내에서 다른 region들과 구분하기 위해 이 uniqueIdentifier를 사용합니다. 이 값은 null이 될 수 없습니다.public RECOBeaconRegion(java.lang.String proximityUuid,
java.lang.Integer major,
java.lang.Integer minor,
java.lang.String uniqueIdentifier)
이 생성자는 지정된 proximityUUID값, major값, minor값을 가지는 beacon을 탐색하는 region을 정의합니다.
proximityUuid - ProximityUUID of the beacons being targeted. If the value is null or empty, it is set to proximityUUID of RECOBeacon provided by Perples Inc.major - The major value that you use to identify one or more beacons.minor - The minor value that you use to identify a specific beacon.uniqueIdentifier - A unique identifier to associated with the returned region object. Use this identifier to differentiate regions within your application. This value must not be null.
proximityUuid - 탐색할 beacon의 proximityUUID. null 이거나 아무것도 입력하지 않은 경우, (주)퍼플즈에서 제공하는 RECOBeacon의 proximityUUID가 기본 값으로 설정됩니다.major - 특정 beacon 혹은 특정 beacon 그룹을 구분하기 위해 사용할 major 값.minor - 특정 beacon을 구분하기 위해 사용할 minor 값.uniqueIdentifier - region 객체에 할당할 unique identifier. 어플리케이션 내에서 다른 region들과 구분하기 위해 이 uniqueIdentifier를 사용합니다. 이 값은 null이 될 수 없습니다.public java.lang.String getProximityUuid()
탐색하고자 하는 beacon들의 proximity UUID를 알려주는 메소드.
문자열 형식의 RECOBeaconRegion의 proximityUUID
public java.lang.String getUniqueIdentifier()
해당 region 객체의 identifier를 알려주는 메소드.
어플리케이션 내에서 각각의 region들을 구분하기 위한 값입니다.
문자열 형식의 RECOBeaconRegion의 identifier
public java.lang.Integer getMajor()
Beacon의 그룹을 결정짓는 값을 알려주는 메소드.
major 값을 설정하지 않을 경우, 이 값은 null 입니다. 이 값이 null 일 경우, region과 발견되는 beacon 매칭시에 무시합니다.
Beacon의 그룹을 결정짓는 값
public java.lang.Integer getMinor()
Beacon 그룹 내에서 각각의 beacon을 구별하는 값을 알려주는 메소드.
minor 값을 설정하지 않을 경우, 이 값은 null 입니다. 이 값이 null 일 경우, region과 발견되는 beacon 매칭시에 무시합니다.
Beacon 그룹 내에서 각각의 beacon을 구별하는 값
public boolean getNotifyOnEntry()
didEnterRegion method is called or not when the device is moved from outside to inside the region.
The default is set to true.
Beacon의 근방에 가까워졌을 때, didEnterRegion 메소드를 호출할 지 여부를 알려주는 메소드.
기본 값은 true로 설정됩니다.
didEnterRegion method is called didEnterRegion method is not called
didEnterRegion를 호출 하는 경우 didEnterRegion를 호출하지 않을 경우 public void setNotifyOnEntry(boolean notifyOnEntry)
didEnterRegion method is called or not when the device is moved from outside to inside the region.
The default is set to true.
Beacon의 근방에 가까워졌을 때, didEnterRegion 메소드를 호출할 지 여부를 설정하는 메소드.
기본 값은 true로 설정됩니다.
notifyOnEntry - didEnterRegion method is called didEnterRegion method is not called notifyOnEntry - boolean 형태의 설정 값
didEnterRegion를 호출 하는 경우 didEnterRegion를 호출하지 않을 경우 public boolean getNotifyOnExit()
didExitRegion method is called or not when the device is moved from inside to outside the region.
The default is set to true.
Beacon의 근방에서 멀어졌을 때, didExitRegion 메소드를 호출할 지 여부를 알려주는 메소드.
기본 값은 true로 설정됩니다.
didExitRegion method is called didExitRegion mathod is not called
didExitRegion를 호출 하는 경우 didExitRegion를 호출하지 않을 경우 public void setNotifyOnExit(boolean notifyOnExit)
didExitRegion method is called or not when the device is moved from inside to outside the region.
The default is set to true.
Beacon의 근방에서 멀어졌을 때, didExitRegion 메소드를 호출할 지 여부를 설정하는 메소드.
기본 값은 true로 설정됩니다.
notifyOnExit - didExitRegion method is called didExitRegion mathod is not called notifyOnExit - boolean 형태의 설정 값
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelablepublic void readFromParcel(android.os.Parcel in)
public long getRegionExpirationTimeMillis()
didExitRegion method is called. didExitRegion method is not called if the device is entered again within the period. didExitRegion method is called.
didExitRegion 메소드의 알림 주기를 알려주는 메소드.
Region 근방에서 멀어졌을 때, 해당 시간 안에 다시 가까워질 경우 didExitRegion 메소드를 호출하지 않습니다.
해당 시간 동안 region 안에 오지 않았을 때, didExitRegion 메소드를 호출합니다.
기본 값은 5분입니다.
didExitRegion method (unit: millisecond)
long 형태의 didExitRegion 메소드 알림 주기 (단위: 밀리세컨드 millisecond)
public void setRegionExpirationTimeMillis(long regionExpirationTimeMillis)
didExitRegion method is called. didExitRegion method is not called if the device is entered again within the period. didExitRegion method is called.
didExitRegion 메소드의 알림 주기를 설정하는 메소드.
Region 근방에서 멀어졌을 때, 해당 시간 안에 다시 가까워질 경우 didExitRegion 메소드를 호출하지 않습니다.
해당 시간 동안 region 안에 오지 않았을 때, didExitRegion 메소드를 호출합니다.
기본 값은 5분입니다.
regionExpirationTimeMillis - notification period of didExitRegion method
regionExpirationTimeMillis - long 형태의 설정 할 didExitRegion 메소드의 알림 주기