类 EaseNotifier
- java.lang.Object
-
- io.agora.chat.uikit.manager.EaseNotifier
-
public class EaseNotifier extends java.lang.Objectnew message notifier classthis 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
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static interfaceEaseNotifier.EaseNotificationInfoProvider
-
字段概要
字段 修饰符和类型 字段 说明 protected android.content.ContextappContextprotected android.media.AudioManageraudioManagerprotected static java.lang.StringCHANNEL_IDprotected java.util.HashSet<java.lang.String>fromUsersprotected longlastNotifyTimeprotected java.lang.Stringmsgprotected static java.lang.StringMSG_CHprotected static java.lang.StringMSG_ENGprotected EaseNotifier.EaseNotificationInfoProvidernotificationInfoProviderprotected android.app.NotificationManagernotificationManagerprotected intnotificationNumprotected static intNOTIFY_IDprotected java.lang.StringpackageNameprotected android.media.Ringtoneringtoneprotected static long[]VIBRATION_PATTERNprotected android.os.Vibratorvibrator
-
构造器概要
构造器 构造器 说明 EaseNotifier(android.content.Context context)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidhandleMessage(io.agora.chat.ChatMessage message)send it to notification bar This can be override by subclass to provide customer implementationvoidnotify(android.content.Intent fullScreenIntent, java.lang.String title, java.lang.String content)Applicable to Android10, the limitation of starting Activity from the backgroundvoidnotify(io.agora.chat.ChatMessage message)handle the new message this function can be overridevoidnotify(java.lang.String content)voidnotify(java.util.List<io.agora.chat.ChatMessage> messages)voidreset()this function can be overridevoidsetNotificationInfoProvider(EaseNotifier.EaseNotificationInfoProvider provider)set notification info ProvidervoidvibrateAndPlayTone(io.agora.chat.ChatMessage message)vibrate and play tone
-
-
-
字段详细资料
-
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
-
notificationInfoProvider
protected EaseNotifier.EaseNotificationInfoProvider notificationInfoProvider
-
-
方法详细资料
-
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
-
setNotificationInfoProvider
public void setNotificationInfoProvider(EaseNotifier.EaseNotificationInfoProvider provider)
set notification info Provider- 参数:
provider-
-
-