I have an android app, which communicates to a server through HTTP requests. The server's address is defined in an XML resource file, under the folder res/values. There is a tag with the type="config" for it. I have different addresses for the server, based on its environment. For example, there is a server for tests under the x.x.x.x address, while there is a production server under the y.y.y.y address.
On the developers console, I uploaded an apk for the beta users, linked to the tests server. I would like to promote it to production, but I would need to generate a new apk file only with the update changing the server's URL.
Q: can I provide different resources for alpha, beta and production environments, without the need of a new apk release?
Would it be possible to add some /res/values-beta/ folder, e.g.? Alternatively, is there a programmatic way to check in which environment the app is? This way I could myself decide which config to take.