I am developing the client side of a client-server app and during testing I want the app to get data from my localhost, but when I release the app, I want it to connect to our production server.
I’m developing an Android app in Java using Eclipse. Is there a good way to do this?
Use a configuration file. When you build it locally copy over the -developer version of that configuration file. When you release it copy over the -release version of that configuration file. Also I wouldn’t solely rely on “localhost” as the way of testing. Do some production level testing in the simulator that will connect to your real system.