i am using SharedPreferences in my app to save some String values at some point. but the problem is after running the app a couple of time , there will be about 100MB of data on user's phone and this data keep getting bigger and bigger. and ofcource i am replacing new data with old data on sharedPreferences what should i do ? should i use Database instead?
From Android Docs: https://developer.android.com/training/data-storage/shared-preferences
If you have a relatively small collection of key-values that you'd like to save, you should use the SharedPreferences APIs. A SharedPreferences object points to a file containing key-value pairs and provides simple methods to read and write them.
Use shared preferences for small key value pairs, e.g. Storing a user id or some setting variable based on which the app experience would be defined further.
Your options are SQLite or Room (SQLite Wrapper) databases, if data is expected to grow so much (GBs or more), go with remote storage with either Firebase or privately owned server database