I am not sure how/where I should store my Http-Request URLs and how to organize them.
I am developing a server and a client for Android. On the client I am using Volley for the network communication which so far seems like a very useful tool. The only thing I just don't know is the thing with all those Http-Request URLs.
Are there any best practices out there? Do I keep them all in a central class that provides all strings as a static
field or do I store them as private
field where I need them or is there another tool I can use for such things?
I have seen people generally doing the following things
Keeping URLs in a holder class with static fields
Keeping URLs in a resource XML file. This works exactly the same way as your strings.xml, but it is in a separate file. This comes in handy when using different server URLs in different app flavours
I use number two with conjunction with number three (keeping base URL in XML file and then appending stuff to the method)