Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable Crashlytics at runtime in response to a user preference change?

I would like to provide a setting in my Android app's settings activity allowing the user to disable our use of analytics software, including Crashlytics. However, Crashlytics.start(Context) is called long before the user gets to the settings page, and I don't see an equivalent Crashlytics.stop(Context) function. Is it possible to stop Crashlytics within the app after it has been started?

like image 287
kemitche Avatar asked Apr 30 '14 19:04

kemitche


People also ask

How to turn off Crashlytics?

Each user would need to head to their Firebase console and click on the Alert tab or use this link: https://firebase.google.com/u/0/subscriptions/overview Select the project and then turn off emails for Crashlytics.

How do I turn off Firebase Crashlytics?

To opt out of automatic crash reporting, pass false as the override value. When set to false, the new value does not apply until the next run of the app. To disable the crash logs while in debug mode you must pass ! BuildConfig.

How do I stop Crashlytics while developing a flutter?

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.

How do I enable debug logging in Crashlytics?

Enable debug logging for CrashlyticsSelect Run from the left menu, then select the Arguments tab. In the Arguments Passed on Launch section, add -FIRDebugEnabled .


1 Answers

I've been informed that the specific case I'm attempting is not currently possible. However, I can give users control over whether or not to send data to Crashlytics by enabling the "Privacy prompt" in the App settings part of the Crashlytics dashboard:

Go here to select the app you want to add the dialog to and then click on "Enable Privacy Prompt" in the top left corner.

from: https://docs.fabric.io/android/crashlytics/advanced-setup.html#using-the-privacy-dialog

like image 90
kemitche Avatar answered Nov 01 '22 05:11

kemitche