I need to get Bitmap and sound from assets. I try to do like this:
BitmapFactory.decodeFile(\"file:///android_asset/Files/Numbers/l1.png\");
Kotlin way, with auto close of the input stream. You have to handle exceptions on your own.
private fun getBitmapFromAsset(context: Context, path: String): Bitmap = context.assets.open(path).use { BitmapFactory.decodeStream(it) }