Regions
Optional
Needed if your app uses Regions or Proximity Triggers.
Introduction
A region is an object that describes a geometric area on a map in a building. It can be assigned with custom metadata and proximity triggers. You can use Regions to highlight important areas on a map and enable the proximity events service for those areas.
Tip
An overview of the content structure in the system is available here. The regions can be configured in the Dashboard, or using the REST API.
Region Object
The representation of a marked region in the IPS SDK is IPSRegion object.
Each Region Object contains:
- Unique ID,
IPSRegion.getId(); - Name,
IPSRegion.getName(); - Custom metadata,
IPSRegion.getMetadata(); - List of assigned triggers,
IPSRegion.getTriggerIds(); - List of placements,
IPSRegion.getPlacements()(See Content Item Placements); - Client department identifier (optional),
IPSRegion.getClientDepartmentId().
Observing Regions in a Building
It is possible to observe all the regions placed on maps in a specific building. Use the IPSContent.addRegionsListener() method with a necessary building ID and implement the methods defined in the IPSRegionsListener interface. The SDK will notify the application regarding all the added, removed, or updated regions. When the listener is added, all the regions currently available will be reported as added.
Region Shape
The area of the region is represented by a IPSShape object which is defined by the regions placement (IPSRegionPlacement.getShape()). The system currently supports three types of shapes: IPSCircularShape, IPSRectangularShape and IPSPolygonalShape.
Analytics Regions
Category and aisle regions are available as IPSAnalyticsRegion objects, used to measure how long users spend in each category or aisle. See Analytics Regions guide for details.
Searching for Regions
The IPS SDK makes possible searching for regions and other location-based content in a building, by name. See Content Search guide for details.