IBinderSerializer


public final class IBinderSerializer implements KSerializer


A serializer for IBinder. This serializer uses SavedState's API directly to save/load a IBinder.

Note that this serializer should be used with SavedStateEncoder or SavedStateDecoder only. Using it with other Encoders/Decoders may throw IllegalArgumentException.

import androidx.savedstate.serialization.serializers.IBinderSerializer

@Serializable
data class MyModel(
    @Serializable(with = IBinderSerializer::class) val binder: android.os.IBinder
)

Summary

Public constructors

Public constructors

IBinderSerializer

Added in 1.3.0-alpha06
public IBinderSerializer()

Public methods

deserialize

Added in 1.3.0-alpha06
public @NonNull IBinder deserialize(@NonNull Decoder decoder)

getDescriptor

Added in 1.3.0-alpha06
public @NonNull SerialDescriptor getDescriptor()

serialize

Added in 1.3.0-alpha06
public void serialize(@NonNull Encoder encoder, @NonNull IBinder value)