android - Config.DEBUG deprecated -
i trying add following code.
if (config.debug) { // } else { // }
i realized config.debug deprecated in api 14. alternative if it?
you use:
if(buildconfig.debug){ // }else{ // }
it's not documented anywhere seems work in both eclipse , android studio (latest versions respectively).
returns true
if current build debug build , false
if it's release. since it's not documented anywhere wary of using in production code since may stripped @ time (and there reports of incorrectly attributing releases debug builds).
Comments
Post a Comment