I implemented a Serializable interface in my custom class so that I would be able to store it to SQLite database, but when I create the values to be stored to the database it basically complains that my put() call doesn't have appropriate arguments:
"None of the following functions can be called with the arguments supplied:" error.
val values = ContentValues().apply {
put("amount", expense.amount)
put("date", expense.date)
put("category", expense.category)
}
database.insert("entries", null, values)
The issue is with put("date", expense.date) : the expense.date it is my custom object.
I'm guessing I need to implement a function in my custom class which will convert its fields into ByteArray and return that ByteArray?