类 EaseNotifier


  • public class EaseNotifier
    extends java.lang.Object
    new message notifier class

    this class is subject to be inherited and implement the relative APIs

    On devices prior to Android 8.0: The sound and vibration of notifications in the notification bar can be controlled by the'sound' and'vibration' switches in the demo settings On Android 8.0 devices: The sound and vibration of notifications in the notification bar are not controlled by the'sound' and'vibration' switches in the demo settings

    • 字段详细资料

      • MSG_ENG

        protected static final java.lang.String MSG_ENG
        另请参阅:
        常量字段值
      • MSG_CH

        protected static final java.lang.String MSG_CH
        另请参阅:
        常量字段值
      • NOTIFY_ID

        protected static int NOTIFY_ID
      • CHANNEL_ID

        protected static final java.lang.String CHANNEL_ID
        另请参阅:
        常量字段值
      • VIBRATION_PATTERN

        protected static final long[] VIBRATION_PATTERN
      • notificationManager

        protected android.app.NotificationManager notificationManager
      • fromUsers

        protected java.util.HashSet<java.lang.String> fromUsers
      • notificationNum

        protected int notificationNum
      • appContext

        protected android.content.Context appContext
      • packageName

        protected java.lang.String packageName
      • msg

        protected java.lang.String msg
      • lastNotifyTime

        protected long lastNotifyTime
      • ringtone

        protected android.media.Ringtone ringtone
      • audioManager

        protected android.media.AudioManager audioManager
      • vibrator

        protected android.os.Vibrator vibrator
    • 构造器详细资料

      • EaseNotifier

        public EaseNotifier​(android.content.Context context)
    • 方法详细资料

      • reset

        public void reset()
        this function can be override
      • notify

        public void notify​(io.agora.chat.ChatMessage message)
        handle the new message this function can be override
        参数:
        message -
      • notify

        public void notify​(java.util.List<io.agora.chat.ChatMessage> messages)
      • notify

        public void notify​(java.lang.String content)
      • notify

        public void notify​(android.content.Intent fullScreenIntent,
                           java.lang.String title,
                           java.lang.String content)
        Applicable to Android10, the limitation of starting Activity from the background
        参数:
        fullScreenIntent -
        title -
        content -
      • handleMessage

        protected void handleMessage​(io.agora.chat.ChatMessage message)
        send it to notification bar This can be override by subclass to provide customer implementation
        参数:
        message -
      • vibrateAndPlayTone

        public void vibrateAndPlayTone​(io.agora.chat.ChatMessage message)
        vibrate and play tone