public class Utils { public static List getMessages() { //File file = new File(\"file:///android_asset/helloworld.txt\"); AssetMan
Using Kotlin, you can do the following to read a file from assets in Android:
try { val inputStream:InputStream = assets.open("helloworld.txt") val inputString = inputStream.bufferedReader().use{it.readText()} Log.d(TAG,inputString) } catch (e:Exception){ Log.d(TAG, e.toString()) }