Dayo Choul
Dayo Choul

Reputation: 911

Do I need to initialize Crashlytics if I need to log non-fatal exception?

Before I called the method

Crashlytics.getInstance().core.logException(new Exception("..."))

Do I need to initialize Crashlytics like this

Fabric.with(this, new Crashlytics());

though I've initialized in the main screen?

Upvotes: 0

Views: 231

Answers (1)

Antimatéria
Antimatéria

Reputation: 159

You should initialize Crashlytics on your application class on the onCreate() method. That way all the fatal exceptions are caught by default and when creating a log you only need to call the

Crashlytics.getInstance()

every time you need it

Upvotes: 3

Related Questions