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

Already on GitHub? Sign in to your account

Otto integration #526

merged 2 commits into from Mar 5, 2013


None yet
3 participants

pyricau commented Mar 5, 2013

See #272.

The Otto integration is a thin layer.

Here is how it works : if @Subscribe or @Produce is used on methods in an AndroidAnnotations annotated class, then these methods gets overridden in the generated subclass. AndroidAnnotations performs checks based on what Otto expects (public methods, return type, etc), and adds compile errors for faster feedback.

The overriding methods are annotated with the corresponding annotation, and delegate to super.

@pyricau pyricau added a commit that referenced this pull request Mar 5, 2013

@pyricau pyricau Merge pull request #526 from excilys/272_Otto_integration
Otto integration. Fixes #272

@pyricau pyricau merged commit 2aa295e into develop Mar 5, 2013

@pyricau pyricau deleted the 272_Otto_integration branch Mar 5, 2013


mathieuboniface commented Mar 5, 2013


Is this in the 3.0-SNAPSHOT maven repo? I changed my pom.xml to use 3.0-SNAPSHOT, enabled the snapshot repo, changed the annotation compiler to use the 3.0-SNASHOT jars (I'm using IntelliJ), and rebuilt all the generated classes, but I don't see my @Subscribe methods being overriden in the generated classes.

EDIT: if anyone made the same mistake I did, I forgot to change the groupId from com.googlecode.androidannotations to org.androidannotations. Apparently there is a 3.0-SNAPSHOT for the old groupId, but it doesn't have this commit.

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