Class PushConfig

  • All Implemented Interfaces:

    
    public final class PushConfig
    
                        

    Push notification configuration for messages.

    Customizes how remote push notifications are displayed and behaved.

    Usage Example:

    val pushConfig = PushConfig().apply {
        pushTitle = "New message"
        pushContent = "You received a message"
        pushData = "{\"key\":\"value\"}"
        iOSConfig = IOSPushConfig().apply {
            threadId = "chat_group_1"
            interruptionLevel = "time-sensitive"
        }
        androidConfig = AndroidPushConfig().apply {
            fcmChannelId = "chat_messages"
        }
    }
    • Constructor Detail

      • PushConfig

        PushConfig()
    • Method Detail

      • getDisablePushTitle

         final Boolean getDisablePushTitle()

        Whether to hide the push notification title.

        When true, the notification title is not displayed. Default is false.

      • setDisablePushTitle

         final Unit setDisablePushTitle(Boolean disablePushTitle)

        Whether to hide the push notification title.

        When true, the notification title is not displayed. Default is false.

      • getPushTitle

         final String getPushTitle()

        Push notification title. null uses the default title.

        Default rule:

        • Built-in messages: Direct channels show sender name; group channels show group name.

        • Custom messages: No title by default.

      • setPushTitle

         final Unit setPushTitle(String pushTitle)

        Push notification title. null uses the default title.

        Default rule:

        • Built-in messages: Direct channels show sender name; group channels show group name.

        • Custom messages: No title by default.

      • getPushContent

         final String getPushContent()

        Push notification content. null uses the default content.

        Displayed in the notification bar when a remote push is delivered. For custom messages, this field must be set; otherwise the recipient may not receive a remote push. Built-in message types (e.g. TextMessage) have default push content.

      • setPushContent

         final Unit setPushContent(String pushContent)

        Push notification content. null uses the default content.

        Displayed in the notification bar when a remote push is delivered. For custom messages, this field must be set; otherwise the recipient may not receive a remote push. Built-in message types (e.g. TextMessage) have default push content.

      • getPushData

         final String getPushData()

        Extra data attached to the push notification. null means none.

        Additional information attached to the remote push. Retrievable from the push notification payload on the receiving end.

      • setPushData

         final Unit setPushData(String pushData)

        Extra data attached to the push notification. null means none.

        Additional information attached to the remote push. Retrievable from the push notification payload on the receiving end.

      • getForceShowDetailContent

         final Boolean getForceShowDetailContent()

        Whether to force showing notification detail content.

        When the recipient has configured push to hide message details, this flag forces the notification to show the actual content. Default is false.

      • setForceShowDetailContent

         final Unit setForceShowDetailContent(Boolean forceShowDetailContent)

        Whether to force showing notification detail content.

        When the recipient has configured push to hide message details, this flag forces the notification to show the actual content. Default is false.

      • getTemplateId

         final String getTemplateId()

        Push template ID for localized push content.

        When set, the push content is matched by the recipient's language setting using a server-side template. If no match, the default content is used.

        Note: pushTitle and pushContent take priority over the template.

      • setTemplateId

         final Unit setTemplateId(String templateId)

        Push template ID for localized push content.

        When set, the push content is matched by the recipient's language setting using a server-side template. If no match, the default content is used.

        Note: pushTitle and pushContent take priority over the template.