-1

So i need to update information in my app. Currently the info is in a strings.xml file.

My plan is to download the array of strings and save them locally and display it in relevant places.

What i am stuck with is:
I don't know how to get the array from the web. Should it be in a .txt file?
I have 10 or so Arrays(each containing about 20 elements), will the method i thought of be good for this?

Shohom Shahd
  • 39
  • 1
  • 2
  • 7

1 Answers1

0

I´d say a common approach would be open a HttpUrlConnection, make a Http Get request, buffer response in Stream and parse as JSON Array. Example

Then you can access the datafields of the JSONArray/Object. Would require that your Webservice responses with your array json encoded.

Community
  • 1
  • 1
user2965003
  • 326
  • 2
  • 11