skip to Main Content

While developing the app sometimes it crashes, and It’s known crash while development, It unnecessarily sends mail to the client that some Trending stability issues in the app.

So I want to know if any method is there to stop logging while the development journey.

2

Answers


  1. you can disable uploading of mapping file and symbols in debug build:

    buildTypes {
            release {
                firebaseCrashlytics {
                   mappingFileUploadEnabled true
                   nativeSymbolUploadEnabled true
                }
            }
            debug {
                firebaseCrashlytics {
                    // If you don't need crash reporting for your debug build,
                    // you can speed up your build by disabling mapping file uploading.
                    mappingFileUploadEnabled false
                    nativeSymbolUploadEnabled false
                }
            }
        }
    }
    
    Login or Signup to reply.
  2. Crashlytics gives you the option to opt in or out from sending crash reports. You could use this in your code to prevent sending crash reports during development.

    For this you could set the firebase_crashlytics_collection_enabled property in the AndroidManifest.xml file to false.

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

    With this option you can then re-enable Crashlytics data collection when running the release version:

    if(!BuildConfig.DEBUG){
       FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);
    }
    

    Or a similar option could be disabling Crashlytics data collection only when running the debug build. In this case, the the manifest property is not required.

    if(BuildConfig.DEBUG){
       FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(false);
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search