Integration

Smartlook can be easily integrated into Crashlytics using User.Listener and Session.Listener::

// User URL integration
Smartlook.instance.user.listeners += object : User.Listener {
  override fun onUrlChanged(url: URL) {
        FirebaseCrashlytics.getInstance().setCustomKey("Smartlook user URL", url)
  }
}

// Session URL integration
Smartlook.instance.user.session.listeners += object : Session.Listener {
  override fun onUrlChanged(url: URL) {
        FirebaseCrashlytics.getInstance().setCustomKey("Smartlook session URL", url)
  }
}
// User URL integration
Smartlook.getInstance().getUser().getListeners().add(url -> {
    FirebaseCrashlytics.getInstance().setCustomKey("Smartlook user URL", url);
});

// Session URL integration
Smartlook.getInstance().getUser().getSession().getListeners().add(url -> {
    FirebaseCrashlytics.getInstance().setCustomKey("Smartlook session URL", dashboardSessionUrl);
});
12441244

📘

Official documentation

Full Firebase Crashlytics documentation can be found on the official website.