Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

@RootContext vs @App in an @EBean #397

@dkunzler

Description

@dkunzler

When injecting a DEFAULT scoped Bean (D) in a SINGLETON scoped bean (S), the Context passed to D_.getinstance is already the Instance of the main Application.

Therefore injecting @App results in the Application object being null since the context instanceof Activity check fails.

There should be another if case where context instanceof MyApplication is checked to prevent this.

AndroidAnnotations Version is 2.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions