How do I detect if I am in release or debug mode?
The simplest, and best long-term solution, is to use BuildConfig.DEBUG. This is a boolean value that will be true for a debug build, false otherwise: if (BuildConfig.DEBUG) { // do something for a debug build } There have been reports that this value is not 100% reliable from Eclipse-based builds, though I personally have not … Read more