Migrate to Jetpack Proto Data Store from Shared Preferences when you have more than 300 Preferences in your android app?
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 20/100
- Issue 类型
- 重构
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 领域
- mobile-dev
调研方向
首先检查现有的 Shared Preferences 使用情况以及 Jetpack Proto Data Store 迁移指南。issue 提到了一个 .proto 定义、一个 Serializer 和一个 Flow 对象,但没有指定文件、测试或入口点。要完成此项工作,需要就 300 多个 preferences 的迁移方案达成一致。
由索引模型根据 Issue 内容生成。
描述
Shared Preferences are used heavily into my application, they are more than 300s of every possible data types such as int, boolean, String etc etc.
Now I want to migrate into Jetpack Proto Data store, the all the tutorials which I have tried define all the preferences into .proto file and then retrieve the data from Data Store and provides a FLOW object of the class in which all possible preferences are defined.
The class structure which I define into proto, is used to create Serializer as well into Flow object of the retrieved value, so my QUESTION is,
Do I need to define all the 300+ preferences into a single file first and then use them (It would require me to lots of code to write into each places wherever shared prefs is used) OR is there any better way of migration ?
- 主要语言
- Kotlin
- 星标
- 242
- 派生
- 115
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
android/codelab-android-datastore 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 4/5 3-5 天 新手友好度 25/100
android/codelab-android-datastore#83 · 2 条评论 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 1/5 1 小时以内 新手友好度 55/100
-
难度 3/5 1-2 天 新手友好度 35/100
查看 android/codelab-android-datastore 的全部 Issue
相似的 Issue
-
bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 82/100
neutraltone/settee#132 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
Kotlin/kotlinx.serialization#3311 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
partiql/partiql-lang-kotlin#1987 ·
维护者通常 3 天内回复
-
Issue: Bug
难度 2/5 1-3 小时 新手友好度 62/100
OpenAPITools/openapi-generator#25524 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ActivityWatch/aw-android#383 · 1 条评论 ·
维护者通常 2 天内回复