androidbugsense

How do I disable bugsense android?


I enable BugSense by default but I'm looking for a simple method to disable BugSense at runtime in case my users don't want bug reports sent.

Hoping for something like the acra.disable preference


Solution

  • As long as it is a single line, I am using something like:

    SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
    if (preferences.getBoolean(PREFERENCE_BUGS, true)) {
        BugSenseHandler.setup(this, myBugsenseKey);
    } 
    

    but this requires an application restart in order to work.