https://kotlinlang.org logo
#android
Title
# android
h

Hong

09/26/2018, 7:00 PM
The question is what features do you use from Realm?
v

voddan

09/26/2018, 7:01 PM
None. It just keeps the list of items between launches.
Frankly I would be okey with re-downloading the list every time the app starts.
h

Hong

09/26/2018, 7:02 PM
If the list is small, just save it in prefs or some local files.
v

voddan

09/26/2018, 7:03 PM
Can it be done automatically? It is just cashing, so it must be pretty common
h

Hong

09/26/2018, 7:05 PM
you still need to write some code, like save JSON into file on disk or save it into shared prefs
v

voddan

09/26/2018, 7:09 PM
Then I think it makes sense keep the realm since it does the whole writing into a file part for me.
I was worried that Realm was a legacy technology, but apparently it is not. Thanks for the tip!
b

bloder

09/26/2018, 7:30 PM
Did you already see Room? Maybe it can help you.
I've changed realm in a project here to room and it was awesome!
h

Hong

09/26/2018, 7:46 PM
Realm footprint is too heavy considering all you need is to write some JSON to a file.
1
g

gildor

09/27/2018, 2:50 AM
Also distribute big native library just for saving single list is really too much imo.
Serialize list to any format and save to disk as simplest solution
2 Views