RCKMessageCountedPolicy class
消息在 Android MessageTag 口径下是否「计数」。
对齐 Android IMKit RongNotificationManager.shouldNotify() 的默认规则:
消息内容类带 @MessageTag 且 flag 不含 ISCOUNTED(0x3)时属于不计数消息,
不弹本地通知;未知消息类型只有在开启「未知消息通知」后才弹,SDK 默认关闭。
Flutter Wrapper 的 RCIMIWMessage 不再暴露 MessageTag,Kit 侧按消息类型、
自定义消息策略和原生自定义消息的注册策略还原同一套口径:
- text / image / voice / file / sight / gif / location / reference / stream /
combineV2:
ISCOUNTED,计数。 - command / commandNotification / recall / groupNotification /
informationNotification:
NONE或ISPERSISTED,不计数。 - RCIMIWCustomMessage:仅 RCIMIWCustomMessagePolicy.normal
(
RC:IWNormalMsg,flag 为save | count)计数; command / status / storage 均不计数。 - RCIMIWNativeCustomMessage / RCIMIWNativeCustomMediaMessage / userCustom:由注册时声明的策略决定,见 recordNativeCustomMessage; 未登记时按计数处理,避免漏掉宿主业务消息的提醒。
- RCIMIWUnknownMessage:未知消息类型,与 Android 一致默认不计数。
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isCounted(
RCIMIWMessage message) → bool - 该消息是否会记入未读数;不计数消息不弹本地通知。
-
recordNativeCustomMessage(
String messageIdentifier, RCIMIWNativeCustomMessagePersistentFlag persistentFlag) → void -
登记原生自定义消息的存储/计数策略,需与
RCIMIWEngine.registerNativeCustomMessage使用同一个 flag。 -
resetNativeCustomMessages(
) → void - 清空已登记的原生自定义消息,仅用于测试隔离。