Search code examples
javaandroiddebuggingflurrydev-to-production

android - turn off flurry while debugging


Is there an efficient way to turn off Flurry while debugging?

Right now the best way I can think of is setting a DEBUG variable to true in one file, and in all of my activities

    super.onStart();
    if(PublicStuff.DEBUG != true) //if debug = false run this code
        FlurryAgent.onStartSession(this, "2C3QVVZMX8Q5M6KF3458");

do I also need to case out the Flurry logEvent methods?

is there a better way?

thanks


Solution

  • Look at the isDebuggerConnected() method in the Debug class. That tells you exactly what you need to know.