magnumrocha
08/06/2021, 11:23 AM@Parcelize on kotlin sealed classes:
sealed class MySealedClass : Parcelable {
@Parcelize object Object1: MySealedClass()
@Parcelize object Object2: MySealedClass()
@Parcelize object Object3: MySealedClass()
}
I am getting the error:
android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.myapp.data.MySealedClass$Object1
when try to create the Intent….Abhishek Dewan
08/06/2021, 3:06 PMAbhishek Dewan
08/06/2021, 3:06 PMColton Idle
08/06/2021, 9:16 PMColton Idle
08/06/2021, 9:16 PMknthmn
08/07/2021, 6:57 AM@Parcelize works with sealed class. Did you set the classLoader? Where is the exception thrown?magnumrocha
08/07/2021, 7:35 AMobject key 🤔knthmn
08/07/2021, 10:17 AMBundle you need to set classLoader before calling getParcelable()magnumrocha
08/07/2021, 11:47 AM.startActivity() method on the Activity class…magnumrocha
08/07/2021, 11:49 AM