public class

ScheduleDelay

extends Object
implements Parcelable JsonSerializable
java.lang.Object
   ↳ com.urbanairship.automation.ScheduleDelay

Class Overview

Defines conditions that might delay the execution of a schedule.

Summary

Nested Classes
@interface ScheduleDelay.AppState  
class ScheduleDelay.Builder Builder class. 
Constants
int APP_STATE_ANY Type representing either the foreground or background app state.
int APP_STATE_BACKGROUND Type representing the background app state.
int APP_STATE_FOREGROUND Type representing the foreground app state.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Protected Constructors
ScheduleDelay(Parcel in)
Public Methods
int describeContents()
boolean equals(Object o)
static ScheduleDelay fromJson(JsonValue value)
Parses a ScheduleDelay from JSON.
int getAppState()
Get the execution app state.
List<Trigger> getCancellationTriggers()
Get the list of cancellation triggers.
String getRegionId()
Get the execution region ID.
List<String> getScreens()
Get the execution screens
long getSeconds()
Gets the delay seconds.
int hashCode()
static ScheduleDelay.Builder newBuilder()
Creates a new Builder instance.
JsonValue toJsonValue()
Returns the objects represented as a JsonValue.
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable
From interface com.urbanairship.json.JsonSerializable

Constants

public static final int APP_STATE_ANY

Type representing either the foreground or background app state.

Constant Value: 1 (0x00000001)

public static final int APP_STATE_BACKGROUND

Type representing the background app state.

Constant Value: 3 (0x00000003)

public static final int APP_STATE_FOREGROUND

Type representing the foreground app state.

Constant Value: 2 (0x00000002)

Protected Constructors

protected ScheduleDelay (Parcel in)

Public Methods

public int describeContents ()

public boolean equals (Object o)

public static ScheduleDelay fromJson (JsonValue value)

Parses a ScheduleDelay from JSON.

 - "seconds": Optional. The minimum time in seconds that is needed to pass before running the actions.
 - "screen": Optional string or array of strings. Specifies the name of an app screen that the user must
 currently be viewing before the schedule's actions are able to be executed.
 - "app_state": Optional. Specifies the app state that is required before the schedule's actions are able
 to execute. Either "foreground" or "background". Invalid app states will throw a JsonException.
 - "region": Optional. Specifies the ID of a region that the device must currently be in before the
 schedule's actions are able to be executed.
 - "cancellation_triggers": Optional. An array of triggers. Each cancels the pending execution of
 the actions.
 

Parameters
value The schedule delay.
Returns
  • The parsed ScheduleDelay.
Throws
JsonException If the json does not produce a valid ScheduleDelay.

public int getAppState ()

Get the execution app state.

Returns
  • The execution app state.

public List<Trigger> getCancellationTriggers ()

Get the list of cancellation triggers.

Returns
  • The list of cancellation triggers.

public String getRegionId ()

Get the execution region ID.

Returns
  • The execution region ID.

public List<String> getScreens ()

Get the execution screens

Returns
  • The execution screens.

public long getSeconds ()

Gets the delay seconds.

Returns
  • The delay in seconds.

public int hashCode ()

public static ScheduleDelay.Builder newBuilder ()

Creates a new Builder instance.

Returns
  • The Builder instance.

public JsonValue toJsonValue ()

Returns the objects represented as a JsonValue.

Returns
  • The object as a JsonValue.

public String toString ()

public void writeToParcel (Parcel dest, int flags)