Skip to content

feat(rum): support remote configuration in Flutter - #19

Merged
Fiona2016 merged 2 commits into
publishfrom
codex/rum-remote-configuration
Sep 28, 2026
Merged

Fiona2016 merged 2 commits into
publishfrom
codex/rum-remote-configuration

Conversation

@guguji5

@guguji5 guguji5 commented Sep 16, 2026 •

Copy link
Copy Markdown

支持配置动态下发
image
ios 模拟器测试了 远程配置下发,beforeSampling和getRemoteConfig

@guguji5

guguji5 commented Sep 16, 2026

Copy link
Copy Markdown
Author

小程序端的pr在 flashcatcloud/fc-sdk-wechat-miniprogram#18 ,里边几个方法可以参考里边的说明

@guguji5

guguji5 commented Sep 16, 2026

Copy link
Copy Markdown
Author

安卓真机上也调试了一下,也有对应的日志输出
image
image


internal fun beforeSampling(context: BeforeSamplingContext): Float? {
val encodedContext = try {
Gson().toJson(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Preserve explicit null values in the beforeSampling context

The default Gson encoder omits object entries whose value is null, including nested entries. For example, custom = {"override": null} reaches the Dart callback as {}, while getRemoteConfig() and the iOS bridge preserve that entry. A sampling callback that uses containsKey to distinguish an absent setting from an explicitly cleared setting can therefore make a different decision on Android.

Please use GsonBuilder().serializeNulls().create() here and add coverage for both top-level and nested null-valued custom entries. Reproduced with Gson 2.12.1: the current encoder drops those entries, while a serializeNulls() control preserves them.

@Fiona2016
Fiona2016 merged commit d8dcf0a into publish Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants