Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AppMessageResultWithDismissType

en

Class of callback on message closing events, Corresponds to the callback type of huawei.agc.appmessaging.AGC_APP_MESSAGING_LISTENER_NAME.ON_MESSAGE_DISMISS

zh

消息消失时的回调对象,对应 huawei.agc.appmessaging.AGC_APP_MESSAGING_LISTENER_NAME.ON_MESSAGE_DISMISS 回调值情况

Hierarchy

Index

Constructors

constructor

Properties

code

Optional data

data: any

dismissType

endTime

endTime: number

Optional errMsg

errMsg: string

frequencyType

frequencyType: number

frequencyValue

frequencyValue: number

id

id: number

messageType

originData

originData: Object

startTime

startTime: number

testFlag

testFlag: number

triggerEvens

triggerEvens: Array<string>

Methods

getDismissType

  • en

    get Dismiss type

    zh

    获取消息消失的类型

    example
    huawei.agc.appmessaging.appMessagingService.on(huawei.agc.appmessaging.AGC_APP_MESSAGING_LISTENER_NAME.ON_MESSAGE_DISMISS, (result) => {
        console.log('getDismissType: ', result.getDismissType());
    }, this);
    

    Returns AppMessagingDismissType

getEndTime

  • getEndTime(): number
  • en

    Obtains the display frequency of a message

    zh

    获取消息的结束时间戳

    example
    huawei.agc.appmessaging.appMessagingService.on(huawei.agc.appmessaging.AGC_APP_MESSAGING_LISTENER_NAME.ON_MESSAGE_DISPLAY, (result) => {
        console.log('getEndTime: ', result.getEndTime());
    }, this);
    

    Returns number

    End timestamp of a message, accurate to milliseconds. long type from Java side.

getFrequencyType

  • getFrequencyType(): number
  • en

    Obtains the display frequency of a message

    zh

    获取消息的展示频率

    example
    huawei.agc.appmessaging.appMessagingService.on(huawei.agc.appmessaging.AGC_APP_MESSAGING_LISTENER_NAME.ON_MESSAGE_CLICK, (result) => {
        console.log('getFrequencyType: ', result.getFrequencyType());
    }, this);
    

    Returns number

    Display frequency type of a message. The options are as follows:

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

getFrequencyValue

  • getFrequencyValue(): number

getId

  • getId(): number
  • en

    Obtains the ID of an in-app message

    zh

    获取消息 ID

    example
    huawei.agc.appmessaging.appMessagingService.on(huawei.agc.appmessaging.AGC_APP_MESSAGING_LISTENER_NAME.ON_MESSAGE_CLICK, (result) => {
        console.log('getId: ', result.getId());
    }, this);
    

    Returns number

    Message ID, long type from Java side.

getMessageType

  • en

    Obtains the message type

    zh

    获取消息类型

    example
    huawei.agc.appmessaging.appMessagingService.on(huawei.agc.appmessaging.AGC_APP_MESSAGING_LISTENER_NAME.ON_MESSAGE_DISPLAY, (result) => {
        console.log('getMessageType: ', result.getMessageType());
    }, this);
    

    Returns AppMessagingMessageType

    Message type. The options are huawei.agc.appmessaging.AppMessagingMessageType.BANNER, huawei.agc.appmessaging.AppMessagingMessageType.CARD, and huawei.agc.appmessaging.AppMessagingMessageType.PICTURE.

getStartTime

  • getStartTime(): number
  • en

    Obtains the start timestamp of a message

    zh

    获取消息的开始时间戳

    example
    huawei.agc.appmessaging.appMessagingService.on(huawei.agc.appmessaging.AGC_APP_MESSAGING_LISTENER_NAME.ON_MESSAGE_CLICK, (result) => {
        console.log('getStartTime: ', result.getStartTime());
    }, this);
    

    Returns number

    Start timestamp of a message, accurate to milliseconds. long type from Java side.

getTestFlag

  • getTestFlag(): number

getTriggerEvents

  • getTriggerEvents(): Array<string>
  • en

    A collection of in-app message trigger event types, which are selected by you in AppGallery Connect

    zh

    消息被触发的事件类型的集合,即开发者在 AGC 后台勾选的消息触发事件的集合

    example
    huawei.agc.appmessaging.appMessagingService.on(huawei.agc.appmessaging.AGC_APP_MESSAGING_LISTENER_NAME.ON_MESSAGE_DISPLAY, (result) => {
        console.log('getTriggerEvents: ', result.getTriggerEvents());
    }, this);
    

    Returns Array<string>

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

Generated using TypeDoc