目录

AppMessage

Class Info

public class AppMessage

Message object class.

Method Summary

Qualifier and Type

Method Name and Description

long

getId()

Obtains the ID of an in-app message.

MessageType

getMessageType()

Obtains the message type.

long

getStartTime()

Obtains the start timestamp of a message.

long

getEndTime()

Obtains the end timestamp of a message.

int

getFrequencyType()

Obtains the display frequency type of a message.

int

getFrequencyValue()

Obtains display times of a message.

int

getTestFlag()

Checks whether an in-app message is a test message.

java.util.List<String>

getTriggerEvents()

Obtains IDs of trigger events.

Methods

[h2]getId

Method

public long getId()

Obtains the ID of an in-app message.

Return

Type

Description

long

Message ID.

[h2]getMessageType

Method

public abstract MessageType getMessageType()

Obtains the message type.

Return

Type

Description

MessageType

Message type. The options are BANNER, CARD, and PICTURE.

[h2]getStartTime

Method

public long getStartTime()

Obtains the start timestamp of a message.

Return

Type

Description

long

Start timestamp of a message, accurate to milliseconds.

[h2]getEndTime

Method

public long getEndTime()

Obtains the end timestamp of a message.

Return

Type

Description

long

End timestamp of a message, accurate to milliseconds.

[h2]getFrequencyType

Method

public int getFrequencyType()

Obtains the display frequency type of a message.

Return

Type

Description

int

Display frequency type of a message.

  • 1: only once.
  • 2: once every X days. The value of X is the return value of getFrequencyValue.
  • 3: X times per day. The value of X is the return value of getFrequencyValue.

[h2]getFrequencyValue

Method

public int getFrequencyValue()

Obtains display times of a message.

Return

Type

Description

int

Display times of an in-app message. This parameter is valid only when getFrequencyType is set to 2 or 3.

[h2]getTestFlag

Method

public int getTestFlag()

Checks whether an in-app message is a test message.

Return

Type

Description

int

Whether an in-app message is a test message.

  • 1: test message
  • 0: non-test message

[h2]getTriggerEvents

Method

public List<String> getTriggerEvents()

Obtains IDs of trigger events.

Return

Type

Description

List<String>

IDs of trigger events.

NOTE:

The App Messaging SDK matches an event ID with the trigger event type of an in-app message. If the ID is in TriggerEvent, the message will be displayed.