0

I'm looking for a way to replace a block of debug code for release so that I don't have to keep removing it when going back to development. My primary goal is to avoid hackers, even though this isn't foolproof on Android. So, for example, I call an empty static method:

TestActivity.test();

and replace this with:

if(isDebug()) return;

So, when I'm developing it would just call the dummy method, but after publish it would check for debug.

Is this an extension or something that Proguard can handle?

MCain
  • 465
  • 2
  • 12
  • This might help answer your question: http://stackoverflow.com/questions/12458818/release-debug-builds-for-android-application – Gravitoid Feb 28 '14 at 14:35

1 Answers1

1

You can add a parameter to be set in the environment (VM) in your run configuration on eclipse, then you can retrieve that on your code.

GhostDerfel
  • 1,533
  • 1
  • 11
  • 18