首页 > 解决方案 > 有没有更好的替代方法来代替 SharedPreferences 来保存/缓存大量数据而无需在线访问?

问题描述

在没有在线连接的情况下,移动内存中大量数据存储的最佳实现是什么?因为共享偏好可能会下降......

标签: javaandroidcachingsharedpreferences

解决方案


您可以在移动设备上将大量数据存储在SQLite、RealM、Room DB 等本地数据库中。

对于参考,您可以点击以下链接:

1. SQLite: https ://www.tutorialspoint.com/android/android_sqlite_database.htm

2. RealM: https ://www.androidhive.info/2016/05/android-working-with-realm-database-replacing-sqlite-core-data/

3.房间数据库: https ://medium.com/@tonia.tkachuk/android-app-example-using-room-database-63f7091e69af


推荐阅读