Different configuration values ​​during development and production on Android

I am developing an Android application that interacts with a server. When I'm developing, I want the application to use one server and port, and when deploying it in production, I want it to use a different server and port.

I thought that maybe I could save the server name and port as a string resource, and then override these values ​​at design time. But this is not possible, since there is no quantifier for development.

What is the general way to provide different values ​​for an application during development and production?

+6
source share
1 answer

Hardcore, use Ant or better yet, AndroidAnt, which you can customize builds by simply calling different command line options,

http://code.google.com/p/autoandroid/wiki/AndroidAnt

+2
source

Source: https://habr.com/ru/post/888766/


All Articles