NIMAndroidSDKOptions class

Inheritance
Annotations
  • @JsonSerializable()

Constructors

NIMAndroidSDKOptions({bool improveSDKProcessPriority = true, bool preLoadServers = true, bool reducedIM = false, bool checkManifestConfig = false, bool disableAwake = false, bool enabledQChatMessageCache = false, String? databaseEncryptKey, int thumbnailSize = 350, int fetchServerTimeInterval = 2000, String? customPushContentType, NIMMixPushConfig? mixPushConfig, NIMStatusBarNotificationConfig? notificationConfig, bool enableFcs = true, NIMDisplayNameForMessageNotifierProvider? displayNameForMessageNotifierProvider, NIMAvatarForMessageNotifierProvider? avatarForMessageNotifierProvider, NIMDisplayTitleForMessageNotifierProvider? displayTitleForMessageNotifierProvider, NIMMakeNotifyContentProvider? makeNotifyContentProvider, NIMMakeTickerProvider? makeTickerProvider, NIMMakeRevokeMsgTipProvider? makeRevokeMsgTipProvider, required String appKey, String? sdkRootDir, int? cdnTrackInterval, int? customClientType, bool? shouldSyncStickTopSessionInfos, bool? enableReportLogAutomatically, String? loginCustomTag, bool? enableDatabaseBackup, bool? shouldSyncUnreadCount, bool? shouldConsiderRevokedMessageUnreadCount, bool? enableTeamMessageReadReceipt, bool? shouldTeamNotificationMessageMarkUnread, bool? enableAnimatedImageThumbnail, bool? enablePreloadMessageAttachment, bool? useAssetServerAddressConfig, NIMLoginInfo? autoLoginInfo, Map<NIMNosScene, int>? nosSceneConfig, NIMServerConfig? serverConfig})
NIMAndroidSDKOptions.fromMap(Map options)
factory

Properties

appKey String
app key
finalinherited
autoLoginInfo NIMLoginInfo?
自动登录账号信息 windows&macos 暂不支持自动登录
finalinherited
avatarForMessageNotifierProvider NIMAvatarForMessageNotifierProvider?
为云信通知栏提醒提供头像(个人、群组) 一般从本地图片缓存中获取,若未下载或本地不存在,请返回默认本地头像(可以返回默认头像资源路径) 目前仅支持 jpg 和 png 格式
final
cdnTrackInterval int?
cdn统计回调触发间隔。触发cdn拉流前设置,触发拉流后改动将不生效 windows&macos 暂不支持
finalinherited
checkManifestConfig bool
是否检查 Manifest 配置 最好在调试阶段打开,调试通过之后请关掉
final
customClientType int?
自定义客户端类型,小于等于0视为没有自定义类型
finalinherited
customPushContentType String?
离线推送不显示详情时,要显示的文案对应的类型名称
final
databaseEncryptKey String?
数据库加密秘钥,用于消息数据库加密。
如果不设置,数据库处于明文状态; 设置后,数据库会加密保存数据,之前明文保存的历史数据会被转为加密保存; 一旦开启过加密功能后,不支持退回明文保存状态。
final
disableAwake bool
禁止后台进程唤醒ui进程
final
displayNameForMessageNotifierProvider NIMDisplayNameForMessageNotifierProvider?
为通知栏提供消息发送者显示名称(例如:如果是P2P聊天,可以显示备注名、昵称、帐号等;如果是群聊天,可以显示备注名,群昵称,昵称、帐号等) 如果返回 null,SDK将会使用服务器下发昵称 account 消息发送者账号 sessionId 会话ID(如果是P2P聊天,那么会话ID即为发送者账号,如果是群聊天,那么会话ID就是群号) sessionType 会话类型 返回消息发送者对应的显示名称
final
displayTitleForMessageNotifierProvider NIMDisplayTitleForMessageNotifierProvider?
为通知栏提供消息title显示名称(例如:如果是群聊天,可以设置自定义群名称等;如果圈组,可以显示圈组频道名称等) 如果返回null,SDK 群和超大群会显示群名称,其他类型将会使用当前app名称展示 不可以做耗时操作 message 收到的消息 返回消息title显示名称
final
enableAnimatedImageThumbnail bool?
默认情况下,从服务器获取原图缩略图时,如果原图为动图,我们将返回原图第一帧的缩略图。 而开启这个选项后,我们将返回缩略图后的动图。 这个选项只影响从服务器获取的缩略图,不影响本地生成的缩略图。默认关闭
finalinherited
enableDatabaseBackup bool?
是否开启数据库备份功能,默认关闭
finalinherited
enabledQChatMessageCache bool
是否开启圈组消息缓存支持,默认不开启
final
enableFcs bool
是否开启融合存储
final
enablePreloadMessageAttachment bool?
是否需要SDK自动预加载多媒体消息的附件。 如果打开,SDK收到多媒体消息后,图片和视频会自动下载缩略图,音频会自动下载文件。 如果关闭,第三方APP可以只有决定要不要下载以及何时下载附件内容,典型时机为消息列表第一次滑动到 这条消息时,才触发下载,以节省用户流量。 默认打开。
finalinherited
enableReportLogAutomatically bool?
是否开启IM日志自动上报,默认关闭
finalinherited
enableTeamMessageReadReceipt bool?
是否启用群消息已读功能,默认关闭
finalinherited
fetchServerTimeInterval int
获取服务器时间连续请求间隔时间, 最小1000ms, 默认2000ms
final
hashCode int
The hash code for this object.
no setterinherited
improveSDKProcessPriority bool
是否提高SDK进程优先级(默认提高,可以降低SDK核心进程被系统回收的概率); 如果部分机型有意外的情况,可以根据机型决定是否开启。 4.6.0版本起,弱 IM 模式下,强制不提高SDK进程优先级
final
loginCustomTag String?
登录时的自定义字段,登陆成功后会同步给其他端
finalinherited
makeNotifyContentProvider NIMMakeNotifyContentProvider?
定制消息提醒(通知栏提醒)內容文案 主要在通知栏下拉后展现其通知内容:content=nick:发来一条消息
getter/setter pair
makeRevokeMsgTipProvider NIMMakeRevokeMsgTipProvider?
定制消息撤回提醒文案
getter/setter pair
makeTickerProvider NIMMakeTickerProvider?
定制消息提醒(通知栏提醒)Ticker文案 主要在通知栏弹框提醒时的内容:ticker=nick有新消息 Android 5.0 后废弃
getter/setter pair
mixPushConfig NIMMixPushConfig?
第三方推送配置
final
nosSceneConfig Map<NIMNosScene, int>?
SDK nos 场景配置
finalinherited
notificationConfig NIMStatusBarNotificationConfig?
通知栏配置
final
preLoadServers bool
预加载服务,默认true,不建议设置为false,预加载连接可以优化登陆流程,提升用户体验
final
reducedIM bool
是否是弱IM场景(慎用)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sdkRootDir String?
sdk 根目录
finalinherited
serverConfig NIMServerConfig?
配置专属服务器的地址
finalinherited
shouldConsiderRevokedMessageUnreadCount bool?
开启时,如果被撤回的消息本地还未读,那么当消息发生撤回时, 对应会话的未读计数将减 1 以保持最近会话未读数的一致性。默认关闭
finalinherited
shouldSyncStickTopSessionInfos bool?
是否同步置顶会话记录,默认关闭
finalinherited
shouldSyncUnreadCount bool?
是否开启会话已读多端同步,支持多端同步会话未读数,默认关闭
finalinherited
shouldTeamNotificationMessageMarkUnread bool?
群通知消息是否计入未读数,默认不计入未读
finalinherited
thumbnailSize int
消息缩略图的尺寸。
该值为最长边的大小。下载的缩略图最长边不会超过该值。
final
useAssetServerAddressConfig bool?
是否使用自定义服务器地址配置文件
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited