Interface NotificationConfig.Interceptor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract boolean isNotificationIntercepted(Message message) 是否拦截此本地通知,一般用于自定义本地通知的显示。
      abstract PendingIntent onPendingIntent(PendingIntent pendingIntent, Intent intent) 设置本地通知 PendingIntent 时的回调。 应用层可通过此方法更改 PendingIntent 里的设置,以便自定义本地通知的点击行为。 点击本地通知时,SDK 默认跳转到对应会话页面。
      abstract boolean isHighPriorityMessage(Message message) 是否为高优先级消息。高优先级消息不受全局静默时间和会话免打扰控制,比如 @ 消息。
      abstract NotificationChannel onRegisterChannel(NotificationChannel defaultChannel) 注册默认 channel 之前的回调。可以通过此方法拦截并修改默认 channel 里的配置,将修改后的 channel 返回。
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • isNotificationIntercepted

         abstract boolean isNotificationIntercepted(Message message)

        是否拦截此本地通知,一般用于自定义本地通知的显示。

        Parameters:
        message - 本地通知对应的消息
        Returns:

        是否拦截。true 拦截本地通知,SDK 不弹出通知,需要用户自己处理。false 不拦截,由 SDK 展示本地通知。

      • onPendingIntent

         abstract PendingIntent onPendingIntent(PendingIntent pendingIntent, Intent intent)

        设置本地通知 PendingIntent 时的回调。 应用层可通过此方法更改 PendingIntent 里的设置,以便自定义本地通知的点击行为。 点击本地通知时,SDK 默认跳转到对应会话页面。

        Parameters:
        pendingIntent - SDK 默认 PendingIntent
        intent - pendingIntent 里携带的 intent。 可通过 intent 获取以下信息: intent.getStringExtra(RouteUtils.CONVERSATION_TYPE); intent.getStringExtra(RouteUtils.TARGET_ID); intent.getIntExtra(RouteUtils.
        Returns:

        本地通知里需配置的 PendingIntent.

      • isHighPriorityMessage

         abstract boolean isHighPriorityMessage(Message message)

        是否为高优先级消息。高优先级消息不受全局静默时间和会话免打扰控制,比如 @ 消息。

        Parameters:
        message - 接收到的消息
        Returns:

        是否为高优先级消息

      • onRegisterChannel

         abstract NotificationChannel onRegisterChannel(NotificationChannel defaultChannel)

        注册默认 channel 之前的回调。可以通过此方法拦截并修改默认 channel 里的配置,将修改后的 channel 返回。

        Parameters:
        defaultChannel - 默认通知频道
        Returns:

        修改后的通知频道。