Technology Radar
Published : Apr 26, 2023
NOT ON THE CURRENT EDITION
This blip is not on the current edition of the Radar. If it was on one of the last few editions, it is likely that it is still relevant. If the blip is older, it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the Radar.
Understand more
Apr 2023
Trial
Jetpack DataStore 是一个新的数据存储解决方案,提供异步性、一致性和事务性的存储数据功能。它有两种实现方式: Preferences DataStore 用于无类型的键值对的存储,Proto DataStore 用于使用 Protobufs 的复杂数据类型的存储。默认情况下,它与 Kotlin 的 coroutines 和Flow 一起使用,但对 RXJava 2 和 3 也有额外支持。其文档建议,如果你目前正在使用 SharedPreferences,可以考虑迁移到 DataStore,我们认同这个建议。