问题
I'm using com.crashlytics.sdk.android:crashlytics:2.5.5@aar version of crashlytics and I want to disable Answers automatic reporting when user opts out of analytics using our app setting. I noticed that when crashlytics is disabled using the below code, top level metrics like active users, sessions etc., are still being reported. This post How to disable Crashlytics Answers? explains how to disable answers events and custom events when user opts out, but I didn't understand how we can disable automatic metrics. Can anyone please suggest if there is a way to disable Answers kit completely at runtime?
Crashlytics crashlyticsKit = new Crashlytics.Builder()
.core(new CrashlyticsCore.Builder().disabled(true).build())
.build();
Fabric.with(this, crashlyticsKit);
来源:https://stackoverflow.com/questions/47214455/disable-fabric-answerskit-when-user-opts-out-of-analytics-reporting