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.

Use @OrmLiteDao in an @EService #464

Description

@erickok

I am converting my app to use AndroidAnnotations (after having success with AA in a small app already). This app uses OrmLite, so I am trying to use the @OrmLiteDao annotation. However, one of my Android Service's also writes to the database and I cannot use the @OrmLiteDao annotation in an @EService annotated service class.

@OrmLiteDao can only be used in a class annotated with @EActivity, @EViewGroup, @EView, @EBean, @EFragment.

I see from the code that this is because the OrmLiteDaoValidator requires the context to support enhanced views. Why is enclosingElementHasEnhancedViewSupportAnnotation used instead of enclosingElementHasEnhancedComponentAnnotation? I don't see why OrmLite requires access to injected views. Or am I missing something here?

Activity

  1. erickok commented on Jan 18, 2013

    @erickok
    Author

    In extension, I'd like to use the @Extra annotation in an IntentService. I would add a separate issue for this, but don't want to clutter your issues site.

  2. mathieuboniface commented on Jan 18, 2013

    @mathieuboniface
    Contributor

    Hi Eric,

    I've no time at this moment to investigate on that issue, I hope I will be able to look at this one before the next week. Anyway you're right this is pretty strange.

    Concerning the @Extra in an IntentService can you create a separate issue ?

  3. mathieuboniface commented on Jan 22, 2013

    @mathieuboniface
    Contributor

    Hi eric,

    As you can see, I pushed a fix for this issue, this fix will be part of the AA 3.0 release. For now, you will be able to checkout the latest snapshot in few minutes from here : https://oss.sonatype.org/content/repositories/snapshots/org/androidannotations/androidannotations-bundle/3.0-SNAPSHOT/

  4. erickok commented on Jan 22, 2013

    @erickok
    Author

    Thanks! I'll check it out and will let you know if I find any problems.

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

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