Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to call Crashlytics.start multiple times?

I've just added my app on Crashlytics. I put the API key in the AndroidManifest.xml file and I call Crashlytics.start(this) inside of the onCreate() method of my launcher Activity.

I've got +20 Activities and 20 Fragments.

Do I need to put Crashlytics.start(this) in every Activity's onCreate() method in order to make Crashlytics able to track whole my app?

like image 893
prog.Dusan Avatar asked Nov 27 '13 20:11

prog.Dusan


1 Answers

Taken from the Crashalytics SDK FAQ:

If you have an Application subclass, then you can place Crashlytics.start() in the onCreate() method there! Otherwise, if you have multiple launch activities in your app, then add Crashlytics.start(this) to each launch activity. Crashlytics is only initialized the first time you call start, so calling it multiple times won't cause any issues!

http://support.crashlytics.com/knowledgebase/articles/206230-can-i-move-crashlytics-start-this-

With this in mind, I think that having started Crashalytics on your onCreate method of you launch activity will suffice. Bugsense does more or less the same things and It´s started on the launch Activity only.

like image 106
axierjhtjz Avatar answered Oct 22 '22 05:10

axierjhtjz