Room database BLOB datatype decoding problems
I am using the following code to store the bitmap into the database with ROOM persistence layer:
val size = bitmap.byteCount
val byteBuffer:ByteBuffer = ByteBuffer.allocate(size)
val bytes = ByteArray(size)
bitmap.copyPixelsToBuffer(byteBuffer)
byteBuffer.rewind()
byteBuffer.get(bytes)
showDebugInfo(bytes.size.toString())
Thread(Runnable {
registered = true
db.dataDao().insert(
Customer(customerName.text.toString(),...