I have decided to include the Firebase Crash API 9.0.1 into my Android app. At the moment everything is working fine. Now I want to give my users the opportunity to disable, that Firebase is sending the Crash reports automatically.
Firebase Analytics can be disabled with this code snippet
FirebaseAnalytics.getInstance(this).setAnalyticsCollectionEnabled(false);
Does anyone of you know a similar way to disable crash reporting?
Many thanks
Here's a couple of ways to disable Crashlytics while you are doing your debug builds! Use a different android:versionString for debug and release builds and then disable crash reporting from the Crashlytics web dashboard for the debug version. Wrap the call to Crashlytics.
Firebase Crashlytics, a real time crash reporting tool, helps you prioritize and fix your most pervasive crashes based on the impact on real users. Crashlytics also easily integrates into your Android, iOS, macOS, tvOS, and watchOS apps.
Go to the Crashlytics dashboard of the Firebase console to see your test crash.
Sorry for short answer but currently there is no official support for this.
EDIT: 30/10/2017
Now it is possible to enable/disable at build time adding in the AndroidManifest.xml
:
<meta-data android:name="firebase_crash_collection_enabled" android:value="false" />
or runtime using:
FirebaseCrash.enableCrash(true|false);
More info here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With