public class

RegionEvent

extends Event
java.lang.Object
   ↳ com.urbanairship.analytics.Event
     ↳ com.urbanairship.location.RegionEvent

Class Overview

A RegionEvent defines a region with an identifier, major and minor and optional proximityRegion and/or circularRegion.

Summary

Nested Classes
@interface RegionEvent.Boundary  
Constants
int BOUNDARY_EVENT_ENTER Enter boundary event.
int BOUNDARY_EVENT_EXIT Exit boundary event.
int MAX_CHARACTER_LENGTH The maximum length for any region event string.
double MAX_LATITUDE The maximum latitude for a region in degrees.
double MAX_LONGITUDE The maximum longitude for a region in degrees.
double MIN_LATITUDE The minimum latitude for a region in degrees.
double MIN_LONGITUDE The minimum longitude for a region in degrees.
String TYPE The event type.
[Expand]
Inherited Constants
From class com.urbanairship.analytics.Event
Public Constructors
RegionEvent(String regionId, String source, int boundaryEvent)
Constructor for creating a region event.
Public Methods
final String getType()
The event type.
boolean isValid()
Validates the Event.
void setCircularRegion(CircularRegion circularRegion)
Circular region setter.
void setProximityRegion(ProximityRegion proximityRegion)
Proximity region setter.
Protected Methods
final JSONObject getEventData()
Create the event data.
int getPriority()
The event's send priority.
[Expand]
Inherited Methods
From class com.urbanairship.analytics.Event
From class java.lang.Object

Constants

public static final int BOUNDARY_EVENT_ENTER

Enter boundary event.

Constant Value: 1 (0x00000001)

public static final int BOUNDARY_EVENT_EXIT

Exit boundary event.

Constant Value: 2 (0x00000002)

public static final int MAX_CHARACTER_LENGTH

The maximum length for any region event string.

Constant Value: 255 (0x000000ff)

public static final double MAX_LATITUDE

The maximum latitude for a region in degrees.

Constant Value: 90.0

public static final double MAX_LONGITUDE

The maximum longitude for a region in degrees.

Constant Value: 180.0

public static final double MIN_LATITUDE

The minimum latitude for a region in degrees.

Constant Value: -90.0

public static final double MIN_LONGITUDE

The minimum longitude for a region in degrees.

Constant Value: -180.0

public static final String TYPE

The event type.

Constant Value: "region_event"

Public Constructors

public RegionEvent (String regionId, String source, int boundaryEvent)

Constructor for creating a region event.

Parameters
regionId The ID of the region object.
source The source of the region definition.
boundaryEvent The type of boundary crossing event.

Public Methods

public final String getType ()

The event type.

Returns
  • The event type.

public boolean isValid ()

Validates the Event.

Returns
  • True if valid, false otherwise.

public void setCircularRegion (CircularRegion circularRegion)

Circular region setter.

Parameters
circularRegion The optional circular region.

public void setProximityRegion (ProximityRegion proximityRegion)

Proximity region setter.

Parameters
proximityRegion The optional proximity region.

Protected Methods

protected final JSONObject getEventData ()

Create the event data.

Returns
  • The event data.

protected int getPriority ()

The event's send priority.

Returns
  • The event's send priority.