androidfirebasecrashlytics-android

firebase_crashlytics_collection_enabled not working in new Firebase Crashlytics SDK


I've trying to use the new Firebase Crashlytics SDK after Fabric will close on 31st March which is currently in beta.

I'll try to ensure that crash logs will only be transmitted when I have consent from the user. In the documentation they mention the following:

By default, Crashlytics automatically collects crash reports for all your app's users. To give users more control over the data they send, you can enable opt-in reporting for your users by disabling automatic collection and initializing Crashlytics only for selected users:

  1. Turn off automatic collection with a meta-data tag in your AndroidManifest.xml file:

    <meta-data android:name="firebase_crashlytics_collection_enabled" android:value="false" />

Unfortunately that won't work in my app. After I let the app crash intentionally, the crash still will be automatically transmitted.

How can I assure that crashes won't be automatically transmitted?


Solution

  • It was a probalby a bug. After upgrading to

    implementation("com.google.firebase:firebase-crashlytics:17.4.0")

    It will work as expected. No need for a restart of the app.