Options
All
  • Public
  • Public/Protected
  • All
Menu

export manager

Hierarchy

  • Native
    • ChatPushManager

Index

Constructors

Properties

TAG: string = 'ChatPushManager'

Methods

  • fetchPreferredNotificationLanguage(): Promise<undefined | string>
  • Gets the configured push translation language.

    throws

    A description of the exception. See ChatError.

    Returns Promise<undefined | string>

    The language code.

  • Gets the push configurations from the server.

    throws

    A description of the exception. See ChatError.

    Returns Promise<ChatPushOption>

    The push options.

  • fetchSelectedPushTemplate(): Promise<undefined | string>
  • Gets the selected push template for offline push.

    throws

    A description of the exception. See ChatError.

    Returns Promise<undefined | string>

    The name of the selected push template.

  • Gets the do-not-disturb settings of the app.

    throws

    A description of the exception. See ChatError.

    Returns Promise<ChatSilentModeResult>

    The do-not-disturb settings of the app.

  • Gets the offline push settings of the conversation.

    params

    params

    • convId: The conversation ID.
    • convType: The conversation type.
    throws

    A description of the exception. See ChatError.

    Parameters

    Returns Promise<ChatSilentModeResult>

    The offline push settings of the conversation.

  • Gets the do-not-disturb settings of the specified conversations.

    throws

    A description of the exception. See ChatError.

    Parameters

    Returns Promise<Map<string, ChatSilentModeResult>>

    The do-not-disturb settings of the specified conversations, which are key-value pairs where the key is the conversation ID and the value is the do-not-disturb settings.

  • removeSilentModeForConversation(params: { convId: string; convType: ChatConversationType }): Promise<void>
  • Clears the offline push settings of the conversation.

    After clearing, the conversation uses the offline push settings of the app. See {@link EMPushManager.setSilentModeForAll}.

    params

    params

    • convId: The conversation ID.
    • convType: The conversation type.
    throws

    A description of the exception. See ChatError.

    Parameters

    Returns Promise<void>

  • selectPushTemplate(templateName: string): Promise<void>
  • Selects the push template for offline push.

    The push template can be set with a RESTful API or on the console.

    throws

    A description of the exception. See ChatError.

    Parameters

    • templateName: string

      The push template name. If the template name does not exist, this template does not take effect, although no error is returned.

    Returns Promise<void>

  • setNativeListener(_event: NativeEventEmitter): void
  • Parameters

    • _event: NativeEventEmitter

    Returns void

  • setPreferredNotificationLanguage(languageCode: string): Promise<void>
  • Sets the target translation language of offline push notifications.

    throws

    A description of the exception. See ChatError.

    Parameters

    Returns Promise<void>

  • Sets the offline push of the app.

    throws

    A description of the exception. See ChatError.

    Parameters

    Returns Promise<void>

  • Updates the display style of push notifications.

    The default value is ChatPushDisplayStyle.Simple.

    throws

    A description of the exception. See ChatError.

    Parameters

    • displayStyle: ChatPushDisplayStyle = ChatPushDisplayStyle.Simple

      The display style of push notifications.

    Returns Promise<void>

  • updatePushNickname(nickname: string): Promise<void>
  • Updates nickname of the sender displayed in push notifications.

    This nickname can be different from the nickname in the user profile; however, we recommend that you use the same nickname for both. Therefore, if either nickname is updated, the other should be changed at the same time.

    To update the nickname in the user profile, you can call ChatUserInfoManager.updateOwnUserInfo.

    throws

    A description of the exception. See ChatError.

    Parameters

    • nickname: string

      The nickname of the sender displayed in push notifications.

    Returns Promise<void>

  • _callMethod<T>(method: string, args?: {}): Promise<T>
  • Type Parameters

    • T

    Parameters

    • method: string
    • Optional args: {}

      Returns Promise<T>

    • checkErrorFromResult(result: any): void
    • Parameters

      • result: any

      Returns void

    Generated using TypeDoc