I’m working on my first Android application that sends many requests to a server (API) to load data, so I was thinking to use a separate file, like .plist on iOS, that will have a list of URLs (the app will read this file and this file will setup before the app runs for the first time), so on that way if I need to change any URL it will be easier and the app will get the change. I read something about “SharedPreferences” but I understand that I can only can save data when the app is running (no before).
My question is: what is the recommended way to do this? Android have a native solution for this scenario (something like application settings files)? can I setup a “sharedPreferences” file before the app runs?
Thank you very much,
Create a urlList.xml file under res/values : this is your list:
To access it from code: