I'm trying to get started writing to a file in Kotlin on Android. I found this answer: here
The answer suggests doing a:
val path = context.getFilesDir()
However, this doesn't work for me. The IDE complains that context
is an unresolved reference. So I guess this needs to be declared and initialised first somewhere. Any ideas where I am going wrong? What should I do to fix this?