Here is some code I ported over from Java:
var audioDataString = ""
val jsonReader = BufferedReader(InputStreamReader(context.resources.openRawResource(resourceName)))
val jsonBuilder = StringBuilder()
var line: String? = null
while ((line = jsonReader.readLine()) != null) {
jsonBuilder.append(line).append("")
}
The "(line = jsonReader.readLine())" gives me the following error: Assingments are not expressions, and only expressions are allowed in this context.
How do I do this correctly in Kotlin?
Thanks.