I am developing an Android application that communicates with a server. When I am developing I want the app 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 I could perhaps store the server name and port as a string resource and then override these values during development. But that does not seem to be possible since there is no quantifier for development.
What is the common way to provide different values to an App during development and production?
Configuration changes in Android refer to a set of system-level events that can strong affect application and UI behavior. These include such changes as: Orientation change (e.g., portrait to landscape); Screen size/depth change (e.g., HDMI hot-plug, orientation on newer API levels);
The Android build system compiles app resources and source code, and packages them into APKs or Android App Bundles that you can test, deploy, sign, and distribute.
The config file must be available at the "/sdcard/config. txt" of the android hardware.
The hardcore way, use Ant, or better yet, AndroidAnt, which you can configure builds by simply calling different command line options,
http://code.google.com/p/autoandroid/wiki/AndroidAnt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With