Skip to content

Instantly share code, notes, and snippets.

@tir38
Created July 14, 2016 16:47
Show Gist options
  • Save tir38/037c3c0ebb756c607aa66b9e47eb155e to your computer and use it in GitHub Desktop.
Save tir38/037c3c0ebb756c607aa66b9e47eb155e to your computer and use it in GitHub Desktop.
Use Crashlytics to track Crashlytics initialization
long start = System.currentTimeMillis();
boolean isDebugApplication = ...
Fabric.with(context, new Crashlytics.Builder()
.core(new CrashlyticsCore.Builder().disabled(isDebugApplication).build())
.build());
long initDuration = System.currentTimeMillis() - start;
Answers.getInstance().logContentView(new ContentViewEvent()
.putContentName("Fabric initialization time in milliseconds")
.putCustomAttribute("time", initDuration));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment