public class

Audience

extends Object
implements JsonSerializable
java.lang.Object
   ↳ com.urbanairship.automation.Audience

Class Overview

Audience conditions for an in-app message. Audiences are normally only validated at display time, and if the audience is not met, the in-app message will not be displayed.

Summary

Nested Classes
class Audience.Builder Audience builder. 
@interface Audience.MissBehavior  
Constants
String MISS_BEHAVIOR_CANCEL Cancel the message's schedule when the audience check fails.
String MISS_BEHAVIOR_PENALIZE Skip and penalize the message's schedule when the audience check fails.
String MISS_BEHAVIOR_SKIP Skip the message's schedule when the audience check fails.
Public Methods
boolean equals(Object o)
static Audience fromJson(JsonValue value)
Parses the json value.
Boolean getLocationOptIn()
Gets the location opt-in status.
String getMissBehavior()
Gets the audience miss behavior.
Boolean getNewUser()
Gets the new user status.
Boolean getNotificationsOptIn()
Gets the notification opt-in status.
JsonPredicate getPermissionsPredicate()
Gets the permissions predicate.
Boolean getRequiresAnalytics()
Gets the requires analytics flag.
TagSelector getTagSelector()
Gets the tag selector.
JsonPredicate getVersionPredicate()
Gets the app version predicate.
int hashCode()
static Audience.Builder newBuilder()
Builder factory method.
JsonValue toJsonValue()
Returns the objects represented as a JsonValue.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.urbanairship.json.JsonSerializable

Constants

public static final String MISS_BEHAVIOR_CANCEL

Cancel the message's schedule when the audience check fails.

Constant Value: "cancel"

public static final String MISS_BEHAVIOR_PENALIZE

Skip and penalize the message's schedule when the audience check fails.

Constant Value: "penalize"

public static final String MISS_BEHAVIOR_SKIP

Skip the message's schedule when the audience check fails.

Constant Value: "skip"

Public Methods

public boolean equals (Object o)

public static Audience fromJson (JsonValue value)

Parses the json value.

Parameters
value The json value.
Returns
  • The audience condition.
Throws
JsonException If the json is invalid.

public Boolean getLocationOptIn ()

Gets the location opt-in status.

Returns
  • The location opt-in status.

public String getMissBehavior ()

Gets the audience miss behavior.

Returns
  • The audience miss behavior.

public Boolean getNewUser ()

Gets the new user status.

Returns
  • The new user status.

public Boolean getNotificationsOptIn ()

Gets the notification opt-in status.

Returns
  • The notification opt-in status.

public JsonPredicate getPermissionsPredicate ()

Gets the permissions predicate.

Returns
  • The permissions predicate.

public Boolean getRequiresAnalytics ()

Gets the requires analytics flag.

Returns
  • The requires analytics flag.

public TagSelector getTagSelector ()

Gets the tag selector.

Returns
  • The tag selector.

public JsonPredicate getVersionPredicate ()

Gets the app version predicate.

Returns
  • The app version predicate.

public int hashCode ()

public static Audience.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.

public String toString ()