I am facing problem. I need to build one app in two ways, first build is for development (testing) use, second build should be production version. Are there any ways how to do it programatically? (with some build engines) I mean that both apps shloud run on one device at the same time if possible. Both version are APK from one Android project.
Thanks
Personally I use this to determine whether I am in debugging mode:
This code is based on the
debuggableattribute of theApplicationtag of theandroid-manifest.xml:If this attribute is explicitely set to
truedebugModewill be set totrue.But if it is explicitely set to
falseor not present in the xml (implicit values),debugModewill be set tofalse.Doing this way you cannot run both app on the same device at the same time as two APK need two different package name to be installed concurrently. So you have to build two eclipse projects, each one having its own package name (for example
com.example.myapp.debugandcom.example.myapp), and why not using a common lib (com.example.myapp.common) that would contain almost all your code:com.example.myapp.debughas itsdebuggableflag set totrueand
com.example.myapphas itsdebuggableflag set tofalse