Appsee Crashlytics Integration

Crashlytics

Benefits

Integrating Appsee and Crashlytics will enable you to link the Crashlytics crash report to an Appsee user recording, allowing you to replay a crashed session and understand the exact flow the led to the crash.
Prerequisite
iOS Implementation
  • // Set your AppDelegate as the Appsee delegate and implement the appseeSessionStarted method:
    @interface MyAppDelegate : UIResponder <AppseeDelegate>
    ...
    [Appsee setDelegate:self];
    ...
    -(void)appseeSessionStarted:(NSString *)sessionId videoRecorded:(BOOL)isVideoRecorded
    {
         NSString *crashlyticsAppseeId = [Appsee generate3rdPartyID:@"Crashlytics" persistent:NO];
         [[Crashlytics sharedInstance] setObjectValue:[NSString
           stringWithFormat:@"https://dashboard.appsee.com/3rdparty/crashlytics/%@", crashlyticsAppseeId] forKey:@"AppseeSessionUrl"];
    }
Android Implementation
  • In your main activity add the following code to the onCreate method before initiating Appsee:
    Appsee.addAppseeListener(new AppseeListener()
    {
    @Override
    public void onAppseeSessionStarted(AppseeSessionStartedInfo sessionInfo)
    {
         // Crashlytics (session-level integration)
         String crashlyticsAppseeId = Appsee.generate3rdPartyId("Crashlytics", false);
         Crashlytics.getInstance().core.setString("AppseeSessionUrl",
              "https://dashboard.appsee.com/3rdparty/crashlytics/" + crashlyticsAppseeId);
    }

    @Override
    public void onAppseeSessionStarting(AppseeSessionStartingInfo arg0) { // YOUR EXISTING CODE
    }
    });
    @Override
    public void onAppseeSessionEnded(AppseeSessionEndInfo arg0) { // YOUR EXISTING CODE
    }
    });
    @Override
    public void onAppseeScreenDetected(AppseeScreenInfo arg0) { // YOUR EXISTING CODE
    }

    @Override
    public void onAppseeSessionEnding(AppseeSessionEndingInfo arg0) { // YOUR EXISTING CODE
    }
    });
    @Override
    public void onAppseeSessionEnded(AppseeSessionEndedInfo arg0) { // YOUR EXISTING CODE
    }
    });

    Appsee.start(!"YOUR_APPSEE_API_KEY");

Replaying Crashed Sessions

After completing the integration, every Crashlytics crash log will contain a custom property called "AppseeSessionUrl". Copying and pasting the session URL in your browser's window will open the session in the Appsee dashboard. If the session was video recorded you will be able to replay it in the Appsee dashboard.



If you have questions regarding the Crashlytics integration please contact us.