Firebase Crashlytics

Automatic integration

Smartlook can be auto-integrated into you project’s Crashlytics simply by calling:

Smartlook.enableIntegration(FirebaseCrashlyticsIntegration())
Smartlook.enableIntegration(new FirebaseCrashlyticsIntegration());

Then in the Crashlytics dashboard, there should be a new Smartlook session URL key-value pair with a link to your Smartlook dashboard. Once opened, you can directly play the recording just before the crash occurred.

12441244

Manual integration

Smartlook can be easily integrated into Crashlytics using IntegrationListener:

Smartlook.registerIntegrationListener(object : IntegrationListener {
    override fun onSessionReady(dashboardSessionUrl: String) {
        FirebaseCrashlytics.getInstance().setCustomKey("Smartlook session URL", dashboardSessionUrl)
    }

    override fun onVisitorReady(dashboardVisitorUrl: String) {
        FirebaseCrashlytics.getInstance().setCustomKey("Smartlook visitor URL", dashboardVisitorUrl)
    }
})
Smartlook.registerIntegrationListener(new IntegrationListener() {
    @Override
    public void onSessionReady(@NotNull String dashboardSessionUrl) {
        FirebaseCrashlytics.getInstance().setCustomKey("Smartlook session URL", dashboardSessionUrl);
    }

    @Override
    public void onVisitorReady(@NotNull String dashboardVisitorUrl) {
        FirebaseCrashlytics.getInstance().setCustomKey("Smartlook visitor URL", dashboardVisitorUrl);
    }
});

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