dev90
dev90

Reputation: 7539

Play console reports crashes that occur during development

I am seeing a lot of crashes and performance related issues in Google play console, Most of them are once that i faced during development.

I am also using crashlytics, and it has option to disable crashlytics during debugging, but i am unable to find out any option like this for Play Console Crash Reporting tool

Upvotes: 1

Views: 558

Answers (1)

Shailendra Madda
Shailendra Madda

Reputation: 21551

Yes you can disable crashlytics it in debug mode.

Put it in your class which extends Application class in onCreate method

// Set up Crashlytics, disabled for debug builds
        Crashlytics crashlyticsKit = new Crashlytics.Builder()
                .core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
                .build();
        Fabric.with(this, crashlyticsKit);

To disable in playstore we can achieve it by differentiate the applicationId` in debug and release modes:

android {
    ...
    defaultConfig {
        applicationId "my.app.package"
        ...
    }
    ...
    buildTypes {
        release {
            ...
        }
        debug {
            ...
            applicationIdSuffix ".dev"
        }
    }
...
}

Note: This solution works when you are not using any libs, but it can break things up when using library that are configured with applicationId for example you use this approach if you are using billing app library may you no longer able to test in app billing in your app.

Upvotes: 2

Related Questions