user8527410
user8527410

Reputation: 493

Firebase Crash Reporting, disable reports for debug builds

We are doing the beta-test of our android app this time. Is there any way to stop android emulators from sending crash reports to the Firebase Console? First we have to look at the devices of each problem to manually close them because we don't see if the problem comes from developing/testing or from a beta-tester.

Upvotes: 3

Views: 422

Answers (2)

Aditya
Aditya

Reputation: 3673

You can add a meta-data entry to the AndroidManifest.xml for your app to disable Crash Reporting at build time.

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

Or you can disable by adding in Application or MainActivity,

FirebaseCrash.setCrashCollectionEnabled(false);

For more info check this link, https://firebase.google.com/docs/crash/disable-sdk

Upvotes: 1

MatPag
MatPag

Reputation: 44831

Use this in your custom Application class onCreate method:

FirebaseCrash.setCrashCollectionEnabled(!BuildConfig.DEBUG);

If you compile the debug APK for emulators you are fine

Upvotes: 3

Related Questions