NIMAndroidSDKOptions class Null safety
- Inheritance
-
- Object
- NIMSDKOptions
- NIMAndroidSDKOptions
- Annotations
Constructors
-
NIMAndroidSDKOptions({bool improveSDKProcessPriority = true, bool preLoadServers = true, bool reducedIM = false, bool checkManifestConfig = false, bool disableAwake = false, String? databaseEncryptKey, int thumbnailSize = 350, int fetchServerTimeInterval = 2000, String? customPushContentType, NIMMixPushConfig? mixPushConfig, NIMStatusBarNotificationConfig? notificationConfig, bool enableFcs = true, 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}) - NIMAndroidSDKOptions.fromMap(Map options)
-
factory
Properties
- appKey → String
-
app key
final, inherited
- autoLoginInfo → NIMLoginInfo?
-
自动登录账号信息
windows&macos 暂不支持自动登录
@JsonKey(toJson: loginInfoToMap, fromJson: loginInfoFromMap, includeIfNull: false), final, inherited
- cdnTrackInterval → int?
-
cdn统计回调触发间隔。触发cdn拉流前设置,触发拉流后改动将不生效
windows&macos 暂不支持
final, inherited
- checkManifestConfig → bool
-
是否检查 Manifest 配置
最好在调试阶段打开,调试通过之后请关掉
@JsonKey(defaultValue: false), final
- customClientType → int?
-
自定义客户端类型,小于等于0视为没有自定义类型
final, inherited
- customPushContentType → String?
-
离线推送不显示详情时,要显示的文案对应的类型名称
final
- databaseEncryptKey → String?
-
数据库加密秘钥,用于消息数据库加密。<br/>
如果不设置,数据库处于明文状态;
设置后,数据库会加密保存数据,之前明文保存的历史数据会被转为加密保存;
一旦开启过加密功能后,不支持退回明文保存状态。
final
- disableAwake → bool
-
禁止后台进程唤醒ui进程
@JsonKey(defaultValue: false), final
- enableAnimatedImageThumbnail → bool?
-
默认情况下,从服务器获取原图缩略图时,如果原图为动图,我们将返回原图第一帧的缩略图。
而开启这个选项后,我们将返回缩略图后的动图。
这个选项只影响从服务器获取的缩略图,不影响本地生成的缩略图。默认关闭
final, inherited
- enableDatabaseBackup → bool?
-
是否开启数据库备份功能,默认关闭
final, inherited
- enableFcs → bool
-
是否开启融合存储
@JsonKey(defaultValue: true), final
- enablePreloadMessageAttachment → bool?
-
是否需要SDK自动预加载多媒体消息的附件。
如果打开,SDK收到多媒体消息后,图片和视频会自动下载缩略图,音频会自动下载文件。
如果关闭,第三方APP可以只有决定要不要下载以及何时下载附件内容,典型时机为消息列表第一次滑动到
这条消息时,才触发下载,以节省用户流量。
默认打开。
final, inherited
- enableReportLogAutomatically → bool?
-
是否开启IM日志自动上报,默认关闭
final, inherited
- enableTeamMessageReadReceipt → bool?
-
是否启用群消息已读功能,默认关闭
final, inherited
- fetchServerTimeInterval → int
-
获取服务器时间连续请求间隔时间, 最小1000ms, 默认2000ms
@JsonKey(defaultValue: 2000), final
- hashCode → int
-
The hash code for this object.
read-only, inherited
- improveSDKProcessPriority → bool
-
是否提高SDK进程优先级(默认提高,可以降低SDK核心进程被系统回收的概率);
如果部分机型有意外的情况,可以根据机型决定是否开启。
4.6.0版本起,弱 IM 模式下,强制不提高SDK进程优先级
@JsonKey(defaultValue: true), final
- loginCustomTag → String?
-
登录时的自定义字段,登陆成功后会同步给其他端
final, inherited
- mixPushConfig → NIMMixPushConfig?
-
第三方推送配置
@JsonKey(toJson: _mixPushConfigToMap, fromJson: _mixPushConfigFromMap), final
-
nosSceneConfig
→ Map<
NIMNosScene, int> ? -
SDK nos 场景配置
@JsonKey(fromJson: nosSceneConfigFromMap), final, inherited
- notificationConfig → NIMStatusBarNotificationConfig?
-
通知栏配置
@JsonKey(toJson: _notificationConfigToMap, fromJson: _notificationConfigFromMap), final
- preLoadServers → bool
-
预加载服务,默认true,不建议设置为false,预加载连接可以优化登陆流程,提升用户体验
@JsonKey(defaultValue: true), final
- reducedIM → bool
-
是否是弱IM场景(慎用)
@JsonKey(defaultValue: false), final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- sdkRootDir → String?
-
sdk 根目录
final, inherited
- shouldConsiderRevokedMessageUnreadCount → bool?
-
开启时,如果被撤回的消息本地还未读,那么当消息发生撤回时,
对应会话的未读计数将减 1 以保持最近会话未读数的一致性。默认关闭
final, inherited
- shouldSyncStickTopSessionInfos → bool?
-
是否同步置顶会话记录,默认关闭
final, inherited
- shouldSyncUnreadCount → bool?
-
是否开启会话已读多端同步,支持多端同步会话未读数,默认关闭
final, inherited
- shouldTeamNotificationMessageMarkUnread → bool?
-
群通知消息是否计入未读数,默认不计入未读
final, inherited
- thumbnailSize → int
-
消息缩略图的尺寸。
该值为最长边的大小。下载的缩略图最长边不会超过该值。final - useAssetServerAddressConfig → bool?
-
是否使用自定义服务器地址配置文件
final, inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent 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