Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crashlytics deprecated method disabled()

Tags:

When using Crashlytics + Fabric for Android there is a really easy way to enable and disable crash reporting. I use it so during development and testing there aren't a ton of crashes alerting everyone.

Crashlytics crashlytics = new Crashlytics.Builder().disabled(true).build(); 

The disabled(boolean) method is now deprecated. Does anyone know what the replacement is for disabling and enabling crashlytics programmatically?

like image 951
Cameron McBride Avatar asked May 27 '15 16:05

Cameron McBride


People also ask

Is Crashlytics deprecated?

We are writing to let you know that the Fabric Crashlytics SDK is now deprecated and will continue reporting your app's crashes until November 15, 2020. After this date, the Fabric Crashlytics SDK and beta versions of the Firebase Crashlytics SDK will stop sending crash reports for your app.

How do I remove Crashlytics from Firebase?

If you want to disable data collection by default for all app runs, add the firebase_crashlytics_collection_enabled flag to your app's AndroidManifest.

What is the use of Crashlytics in Android?

Crashlytics saves you troubleshooting time by intelligently grouping crashes and highlighting the circumstances that lead up to them. Find out if a particular crash is impacting a lot of users. Get alerts when an issue suddenly increases in severity.


1 Answers

Mike from Crashlytics and Fabric here.

Here's what you want to use depending on your preference:

CrashlyticsCore core = new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build(); Fabric.with(this, new Crashlytics.Builder().core(core).build()); 

or

Fabric.with(this, new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build()); 

See CrashlyticsCore.Builder#disabled documentation.

like image 61
Mike Bonnell Avatar answered Oct 18 '22 14:10

Mike Bonnell