Title: Otto integration · Issue #272 · androidannotations/androidannotations · GitHub
Open Graph Title: Otto integration · Issue #272 · androidannotations/androidannotations
X Title: Otto integration · Issue #272 · androidannotations/androidannotations
Description: I'm using Otto, the bus library from square. I have a couple of methods annotated with @subscribe, which is part of Otto. When I add @trace, it appears that the @subscribe annotation isn't carried over, so when I post events those method...
Open Graph Description: I'm using Otto, the bus library from square. I have a couple of methods annotated with @subscribe, which is part of Otto. When I add @trace, it appears that the @subscribe annotation isn't carried ...
X Description: I'm using Otto, the bus library from square. I have a couple of methods annotated with @subscribe, which is part of Otto. When I add @trace, it appears that the @subscribe annotation isn't ...
Opengraph URL: https://github.com/androidannotations/androidannotations/issues/272
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Otto integration","articleBody":"I'm using Otto, the bus library from square. I have a couple of methods annotated with @Subscribe, which is part of Otto. \n\nWhen I add @Trace, it appears that the @Subscribe annotation isn't carried over, so when I post events those methods listen for, nothing happens. When I remove @Trace, they fire off as expected.\n\n``` java\n@EActivity(R.layout.login)\npublic class LoginActivity extends Activity {\n @ViewById\n protected EditText username;\n\n @ViewById\n protected EditText password;\n\n @ViewById\n protected Button loginButton;\n\n @Click({ R.id.loginButton })\n public void sendLogin() {\n Credentials credentials = new Credentials(\n username.getText().toString(), \n password.getText().toString()\n );\n new LoginTask().run(credentials);\n }\n\n @Override\n public void onResume() {\n super.onResume();\n BusProvider.getInstance().register(this);\n }\n\n @Override\n public void onPause() {\n super.onPause();\n BusProvider.getInstance().unregister(this);\n }\n\n // @Trace - won't work here (doesn't preserve @Subscribe?)\n @Subscribe\n public void onLoginFailure(LoginFailureEvent event) {\n Log.w(LoginActivity.class.getName(),\"Login Failure\");\n }\n\n // @Trace - won't work here (doesn't preserve @Subscribe?)\n @Subscribe\n public void onLoginSuccess(LoginSuccessEvent event) {\n Log.w(LoginActivity.class.getName(),\"Login Success\");\n }\n\n}\n\n@EBean\npublic class LoginTask { \n @Background\n public void run(Credentials credentials) {\n // perform login here\n post(true);\n }\n\n @UiThread\n public void post(boolean success) {\n if (success)\n BusProvider.getInstance().post(new LoginSuccessEvent()); \n else\n BusProvider.getInstance().post(new LoginFailureEvent()); \n }\n}\n```\n","author":{"url":"https://github.com/mandrachek","@type":"Person","name":"mandrachek"},"datePublished":"2012-07-13T18:46:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/272/androidannotations/issues/272"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dae289b4-d078-75b3-7c37-a88bb8fe7760 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FB2:7C5BB:20525D:2FD719:6A61E168 |
| html-safe-nonce | 5a72fab850728a05d5c93b29ba9e822e5fa8cd794c2487d01606788693bc32fb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkIyOjdDNUJCOjIwNTI1RDoyRkQ3MTk6NkE2MUUxNjgiLCJ2aXNpdG9yX2lkIjoiNTQ3MTE3ODUxNTk1NzI3NzAzMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 954c0364adeefbc43a8dc3921211b614fe634d741a1089c07ddfeb71d6d9814c |
| hovercard-subject-tag | issue:5611228 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/androidannotations/androidannotations/272/issue_layout |
| twitter:image | https://opengraph.githubassets.com/94d5083618a6474e9fa612b19ac7895d16aee0f0198d1118b1c35a959affec79/androidannotations/androidannotations/issues/272 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/94d5083618a6474e9fa612b19ac7895d16aee0f0198d1118b1c35a959affec79/androidannotations/androidannotations/issues/272 |
| og:image:alt | I'm using Otto, the bus library from square. I have a couple of methods annotated with @subscribe, which is part of Otto. When I add @trace, it appears that the @subscribe annotation isn't carried ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mandrachek |
| hostname | github.com |
| expected-hostname | github.com |
| None | b2de8c74e5e61e893155ba46ee41bc66170c1644cb795adefa8386d490f7781c |
| turbo-cache-control | no-preview |
| go-import | github.com/androidannotations/androidannotations git https://github.com/androidannotations/androidannotations.git |
| octolytics-dimension-user_id | 1315313 |
| octolytics-dimension-user_login | androidannotations |
| octolytics-dimension-repository_id | 3116751 |
| octolytics-dimension-repository_nwo | androidannotations/androidannotations |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3116751 |
| octolytics-dimension-repository_network_root_nwo | androidannotations/androidannotations |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d1866027ded575df8a15c731dd8b9986c9483ceb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width