I have a problem in parceling a list of objects inside a RealmObject.
I have a RealmObject called Player which extends Parcelable. Every Player has a list of RealmObject Game(s) (more specifically 3 Games). The Game object has fields like score, avg...
The way that I have built the app is that after querying the db I copy all the Players to an arraylist and when a rotation of the device occurs I use the Parcelable to be able to recreate the arraylist of Players. I do not know if it is the correct procedure but I thought it would be better not to read/write every time from/to the db.
The problem is that I can't find a way to Parcel the list of Games inside the Player object. I tried to use an ArrayList<Game>
which I know that I can parcel but Realm shows me an error! If I try to use RealmList I do not know how to parcel the RealmList.
I have read many articles in the web but I have not managed to find a suggested solution. Is there a suggested way that we can use to parcel a RealmList or to use an ArrayList inside a RealmObject?
Thanks a lot.