public class ProximityKitBeaconRegion extends Region implements ProximityRegion
This provides access to a beacon's identifiers as well as any custom attributes configured via Proximity Kit.
This class is not Parcelable nor is it
Serializable. While this class implements both interfaces
this is from a legacy inheritance decision with a class not directly under the SDK's control.
Attempting to treat this class was either Parcelable or Serializable will
cause a runtime exception.
Parcelable.ClassLoaderCreator, Parcelable.CreatorCREATOR, mBluetoothAddress, mIdentifiers, mUniqueIdCONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE| Constructor and Description |
|---|
ProximityKitBeaconRegion(Region region,
KitBeacon beacon)
Create a new Proximity Kit beacon region.
|
| Modifier and Type | Method and Description |
|---|---|
static ProximityKitBeaconRegion |
bestMatch(List kitBeacons,
Region region)
Creates a region matching the provided beacons.
|
Map |
getAttributes()
Metadata attributes associated with this region.
|
String |
getIdentifier()
Entity identifier for this region.
|
List |
getIdentifiers()
Returns the list of identifiers represented by this region.
|
String |
getName()
Display name for this region.
|
clone, describeContents, equals, getBluetoothAddress, getId1, getId2, getId3, getIdentifier, getUniqueId, hashCode, hasSameIdentifiers, matchesBeacon, toString, writeToParcelpublic ProximityKitBeaconRegion(Region region, KitBeacon beacon)
region - Underlying raw region scanning criteria composing this region.beacon - The associated kit defined beacon region downloaded from the Proximity Kit cloud.NullPointerException - When either region or beacon are null.public static ProximityKitBeaconRegion bestMatch(List kitBeacons, Region region)
KitBeacon that is the most specific match for the passed region,
and uses it to make a ProximityKitBeaconRegion. If no match is found,
a ProximityKitBeaconRegion is made that is not mapped to an underlying
KitBeacon from the kit.kitBeacons - beacons in the kitregion - region to matchProximityKitBeaconRegion matching the provided kitsNullPointerException - When either kitBeacons or region are null.public List getIdentifiers()
null. A null for an identifier is a wild
card. This affects how matching of beacons works - a wild card will match any beacon which
has any identifier in that position.Identifiers represented by this region.public String getName()
getName in interface ProximityRegionnull if no name is setpublic Map getAttributes()
An attribute is a mapping of a String key to a String value.
Warning: This breaks the immutable contract specified in ProximityRegion.
This is to preserve backwards compatibility with legacy behavior. This will likely change
in the next major 1.0 release. It is advisable to not mutate the returned map.
getAttributes in interface ProximityRegionpublic String getIdentifier()
This may or may not be a globally unique identifier. This interface does not specify any contract on uniqueness of this value.
getIdentifier in interface ProximityRegionnull if one is not set