문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top