my Data.builder() method putStringArray() takes parameter as key : String and value : Array
how do I convert my ArrayList into Array?
fun createInputData(dataItems : ArrayList<String>) : Data
{
return Data.Builder()
.putStringArray("dataItems",dataItems)
.build()
}
the above code doesn't work.
dataItems.toTypedArray()
should do the trick