how to fetch data from local json file?

前端 未结 4 1190
自闭症患者
自闭症患者 2021-01-15 05:50

I created a json file locally. I can view that in data>data>com.example.storage>files>filename.json. Using this, I want to fetch all the text values locally & download a

4条回答
  •  清酒与你
    2021-01-15 06:30

    Yes, it is possible. Next time provide some code so we have something to work with, there is not much people can do to solve this issue.

    To get you started look at this tutorial about JSON: http://www.vogella.com/tutorials/AndroidJSON/article.html

    This question will help you read a file locally: How can I read a text file in Android?

    When you got the file as a string you can create a JSONObject and parse the URLs and retrieve the images.

提交回复
热议问题