Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Xamarin.Android.Crashlytics disable crash resporting for debug builds #491

Open
rodsjo opened this issue Dec 3, 2018 · 4 comments
Open
Assignees
Labels
feature-request investigating Currently investigating this issue

Comments

@rodsjo
Copy link

rodsjo commented Dec 3, 2018

Is it possible to disable crash reporting for debug builds using Xamarin.Android.Crashlytics or Xamarin.Android.Crashlytics.Core ? I've not been able to find the correct classes using the Xamarin nuget package (2.9.4.1)

This is how it can be done in Java

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

// Initialize Fabric with the debug-disabled crashlytics.
Fabric.with(this, crashlyticsKit);

VS bug #739492

@newky2k newky2k added investigating Currently investigating this issue azdo-sync Azure DevOps Sync labels Dec 3, 2018
@SotoiGhost SotoiGhost assigned SotoiGhost and unassigned Redth Dec 19, 2018
@drungrin
Copy link

drungrin commented Feb 5, 2019

using Xamarin.Android.Crashlytics:

            var crashlytics = new Crashlytics.Crashlytics.Builder()
                .Disabled(true)
                .Build();

@rodsjo
Copy link
Author

rodsjo commented Feb 5, 2019

@drungrin

using Xamarin.Android.Crashlytics:

            var crashlytics = new Crashlytics.Crashlytics.Builder()
                .Disabled(true)
                .Build();

That's deprecated.

@drungrin
Copy link

drungrin commented Feb 5, 2019

It is the only way for now. I was moving from my nugets to the official packages, and missed CrasyticsCore and the Answers.getInstance for Android. On iOS nothing that I use is missing until now. You asked if is possible, and yes, it is with the deprecated method.

@Redth Redth removed azdo-sync Azure DevOps Sync labels Jun 17, 2019
@PauchardThomas
Copy link

What about :

#if RELEASE
            Fabric.Fabric.With(this, new Crashlytics.Crashlytics());
#endif

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request investigating Currently investigating this issue
Projects
None yet
Development

No branches or pull requests

7 participants