ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 15 - Associate Android Developer discussion

Report
Export

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(R.raw.sample_teas)
Answers
A.
val input = context!!.resources.openRawResource(R.raw.sample_teas)
B.
val input = context!!.assets.open("sample_teas.json")
Answers
B.
val input = context!!.assets.open("sample_teas.json")
C.
val input = context!!.resources.assets.open("sample_teas.json")
Answers
C.
val input = context!!.resources.assets.open("sample_teas.json")
Suggested answer: B
asked 18/09/2024
Son Pham Hong
44 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first