Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Firebase crash reporting

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

like image 777
Mojo Avatar asked Jun 02 '16 12:06

Mojo


People also ask

How do I disable Crashlytics?

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.

What is crash reporting in Firebase?

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.

How do I know if Firebase console crashes?

Go to the Crashlytics dashboard of the Firebase console to see your test crash.


1 Answers

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.

like image 159
Gabriele Mariotti Avatar answered Sep 24 '22 05:09

Gabriele Mariotti