Closed kwesiamartey closed 8 months ago
Hi @kwesiamartey, could you provide a smaller reproducer?
Hi @onseok find the reproducer below
val multipleImagePicker =
rememberImagePickerLauncher(
selectionMode = SelectionMode.Multiple(maxSelection = 2),
scope = scope,
// Resize options are customizable. Default is set to 800 x 800 pixels.
resizeOptions = ResizeOptions(width = 400, height = 400),
onResult = { byteArrays ->
try {
images = byteArrays.map { byteArray ->
byteArray.toImageBitmap()
}
byteArrays.onEach {
}
companyFile.add(
CompanyFile(
fileData = byteArrays[0],
fileExt = "jpg",
fileName = "ID Document"
)
)
} catch (e: Exception) {
// Log or print the exception information
e.printStackTrace()
}
},
)
Hi @kwesiamartey, it looks like the issue you're facing with the Parcelable encountered IOException
error isn't related to the peekaboo-image-picker
module. Instead, the problem seems to stem from how the object is being serialized. I'd recommend double-checking that CompanyFile
or something else.
@onseok this is a reproducer of CompanyFile
@Serializable data class CompanyFile( @SerialName("file_data") var fileData: ByteArray?=null, @SerialName("file_ext") var fileExt: String? = null, @SerialName("file_name") var fileName: String? = null )
java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = uiComponent.UploadCompanyDocument)