For example, we have a file in our assets folder app/src/main/assets/sample_teas.json.


For example, we have a file in our assets folder app/src/main/assets/sample_teas.json.

To get an InputStream for reading it, from out Context context, we can try do this:
A . val input = context!!.resources.openRawResource(
B . raw.sample_teas)
C . val input = context!!.assets.open("sample_teas.json")
D . val input = context!!.resources.assets.open("sample_teas.json")

Answer: B

Leave a Reply

Your email address will not be published.