Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add public API for crash-on-launch detection #1159

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Feb 22, 2021

Goal

Adds the public API for detecting whether an app crashed on launch.

Changeset

Made the following interfaces are now available as part of the public API, adding JavaDoc as appropriate. Note that this simply adds the API - this will be hooked up to the actual functionality in separate changesets.

class Bugsnag {
    static LastRunInfo getLastRunInfo();
    static void markLaunchCompleted();
}

class Client {
    LastRunInfo getLastRunInfo();
    void markLaunchCompleted();
}

class Configuration {
    Long launchDurationMillis;
    Boolean sendLaunchCrashesSynchronously;
}

class AppWithState {
    Boolean isLaunching = null;
}

final class LastRunInfo {
    final int consecutiveLaunchCrashes;
    final boolean crashed;
    final boolean crashedDuringLaunch;
}

Additionally loaded sendLaunchCrashesSynchronously from the manifest, and verified that app.isLaunching is serialized to JSON.

Testing

Added unit test coverage

@fractalwrench fractalwrench changed the title Add public interface for crash-on-launch detection Add public API for crash-on-launch detection Feb 22, 2021
@fractalwrench fractalwrench force-pushed the PLAT-5974/launch-crash-interface branch 2 times, most recently from 148b599 to fd6e0e7 Compare February 23, 2021 11:24
Base automatically changed from PLAT-5971/config-option to integration/road-1175-identify-crashes-on-launch February 23, 2021 11:38
Copy link
Contributor

@tomlongridge tomlongridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - one small wording suggestion

@fractalwrench fractalwrench merged commit f41e0cf into integration/road-1175-identify-crashes-on-launch Feb 24, 2021
@fractalwrench fractalwrench deleted the PLAT-5974/launch-crash-interface branch February 24, 2021 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants