pdvrieze
11/29/2017, 10:56 PMonActivityResult
is called. I'm using Kryo with various custom mappings to actually serialize (and harder) deserialize the continuation object. Like I say, the serialization does various things. It special cases the marker objects used by Kotlin in for example SafeContinuation. It also handles Kotlin objects special (refer to the value of INSTANCE, don't load another one). It also rips out all Context objects and on reserialization sets them based on the passed in activity (it could be more robust storing the actual type and verifying on deserialization). If you want to see how it works, the serialization is defined in https://github.com/pdvrieze/darwinlib/blob/master/src/main/java/nl/adaptivity/android/kryo/KryoIO.kt