Skip to content

Appcenter GetLastSessionCrashReportAsync equivalent for Xamarin #514

Description

@rezamohamed

Does Rollbar have an equivalent to Appcenter's GetLastSessionCrashReportAsync for a Xamarin Forms app? I am trying to not have to mix-and-match Rollbar and Appcenter for crash reporting.

if (Crashes.HasCrashedInLastSessionAsync().Result)
{
    ErrorReport crashReport = Crashes.GetLastSessionCrashReportAsync().Result;
    if (crashReport.Exception == null)
        Analytics.TrackEvent("AppCrashedInLastLaunch: Crash Report Exception is Null");
    else
    {
        Crashes.TrackError(crashReport.Exception);
        var dict = new Dictionary<string, string>();
        dict.Add("CrashId", crashReport.Id);
        dict.Add("StackTrace", crashReport.Exception.StackTrace);
        Analytics.TrackEvent(string.Format("AppCrashedInLastLaunch: " + crashReport.Exception.Message), dict);
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions