Guest User

Untitled

a guest
Jan 16th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. val core = CrashlyticsCore.Builder()
  2. .build()
  3. Fabric.with(
  4. Fabric.Builder(contextProvider.invoke()).kits(
  5. Crashlytics.Builder()
  6. .core(core)
  7. .build()
  8. ).initializationCallback(object : InitializationCallback<Fabric> {
  9. override fun success(fabric: Fabric) {
  10. var mDefaultUEH = Thread.getDefaultUncaughtExceptionHandler()
  11. Thread.setDefaultUncaughtExceptionHandler { t, e ->
  12. Log.e("CrashLogger","Excpetion",e)
  13. mDefaultUEH.uncaughtException(t, e)
  14. }
  15. }
  16.  
  17. override fun failure(e: Exception) {
  18. Log.e("CrashLogger", "Error during initialization ", e)
  19. }
  20. }
  21. ).build()
  22. )
Add Comment
Please, Sign In to add comment