public class

Audience

extends Object
implements JsonSerializable
java.lang.Object
   ↳ com.urbanairship.iam.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)
int hashCode()
static Audience.Builder newBuilder()
Builder factory method.
static Audience parseJson(JsonValue jsonValue)
Parses the json value.
JsonValue toJsonValue()
Returns the objects represented as a JsonValue.
[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 int hashCode ()

public static Audience.Builder newBuilder ()

Builder factory method.

Returns
  • A new builder instance.

public static Audience parseJson (JsonValue jsonValue)

Parses the json value.

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

public JsonValue toJsonValue ()

Returns the objects represented as a JsonValue.

Returns
  • The object as a JsonValue.