-1

The android app i'm developing has a hardcoded json file which is used to load data on mobile for the first time.

Now,during runtime on mobile, there would be another json file on my server and I would like to download that json in background and implement it instead of the previous json.

It would be like refreshing data by implementing new json files.

How should i do it.??

1 Answers1

0

You can download file with Download Manager (http://developer.android.com/reference/android/app/DownloadManager.html). Then you must read your file as json (see Reading a json file in Android or Android How can I read json file(text file) from SD Card and display data into textview). Then you can read data from json and reload data.

Community
  • 1
  • 1
Vigen
  • 483
  • 6
  • 12