Trouble Integrating BluetoothPeripheral into a Serializable #479
Unanswered
vishwaprojects
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a Kotlin Multiplatform project where I need to create a Vehicle data class that wraps around a BluetoothPeripheral class. The BluetoothPeripheral class is defined as follows:
internal expect class BluetoothPeripheral {
val name: String?
val uuid: String
var rssi: Float?
val services: List
internal val _servicesFlow: MutableStateFlow<List>
}
import java.io.Serializable
data class className internal constructor(internal val peripheral: BluetoothPeripheral) : Serializable {
val name: String?
get() = peripheral.name
}
i am facing below error
java.lang.RuntimeException: Parcelable encountered IOException writing serializable object
as bluetoothperipheral is expect class how to make that class serializable
sorry if my question is lame (rookie)
Beta Was this translation helpful? Give feedback.
All reactions