Skip to content

Can Sentry be initialized in the Android Application class? If so, update docs #676

Description

@mcomella

Currently, the documentation suggests that Sentry should be initialized in Activity.onCreate. However, if the application is ever started from a different Activity, this code will not be run. This code could be called from all of the activity entry points in the app but it's easy to forget.

In theory, a preferable approach would be to initialize Sentry in Application.onCreate, which runs before any Activities start. Is there any problem with doing this? If not, I'd recommend updating the docs to officially support this configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions