I was told that it is possible to create a deep copy of an object by writing the object to a parcel, then immediately reading it out again.
So far, I have tried creating a Parcel and writing the object of interest to it as such:
Parcel.obtain().apply {
setDataPosition(0)
writeValue(searchRequestParams)
}
Given that this is the correct way to write an object to a parcel, how can I read out the written object (to complete the deep copy)?