public class

RegionEvent

extends Event
implements JsonSerializable
java.lang.Object
   ↳ com.urbanairship.analytics.Event
     ↳ com.urbanairship.analytics.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  
class RegionEvent.Builder Builder class for RegionEvent Objects. 
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 REGION_ID The region ID key.
String TYPE The event type.
[Expand]
Inherited Constants
From class com.urbanairship.analytics.Event
Public Methods
int getBoundaryEvent()
Gets the boundary event type - will be either BOUNDARY_EVENT_ENTER or BOUNDARY_EVENT_EXIT.
int getPriority()
The event's send priority.
final String getType()
The event type.
boolean isValid()
Validates the Event.
static RegionEvent.Builder newBuilder()
Builder factory method.
JsonValue toJsonValue()
Returns the objects represented as a JsonValue.
[Expand]
Inherited Methods
From class com.urbanairship.analytics.Event
From class java.lang.Object
From interface com.urbanairship.json.JsonSerializable

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 REGION_ID

The region ID key.

Constant Value: "region_id"

public static final String TYPE

The event type.

Constant Value: "region_event"

Public Methods

public int getBoundaryEvent ()

Gets the boundary event type - will be either BOUNDARY_EVENT_ENTER or BOUNDARY_EVENT_EXIT.

Returns
  • The boundary event type.

public int getPriority ()

The event's send priority.

Returns
  • The event's send priority.

public final String getType ()

The event type.

Returns
  • The event type.

public boolean isValid ()

Validates the Event.

Returns
  • True if valid, false otherwise.

public static RegionEvent.Builder newBuilder ()

Builder factory method.

Returns
  • A new builder instance.

public JsonValue toJsonValue ()

Returns the objects represented as a JsonValue.

Returns
  • The object as a JsonValue.