title: How can I inject Activity instance into my BroadcastReceiver with Android Annotation?
body: <p>I used to play with simple broadcast listeners into activity, there it is siple to do something like textView.setText("text"); But listener became quite large to stay inside and I carried it a separate class.
  I like AA, I just want to continue manage views from current activity from my BroadcastReceiver that I have been separated. But when I do something like:</p>
  
  <pre><code>@EReceiver
  public class WarningActivityStateListener extends BroadcastReceiver {
      @RootContext //or Bean
      WarningActivity activity;
  </code></pre>
  
  <p>I have an error:</p>
  
  <pre><code>Error:(25, 2) error: org.androidannotations.annotations.RootContext can only be used in a class annotated with @org.androidannotations.annotations.EBean.
  </code></pre>
  
  <p>If I try to add @EBean above, then I have even worse:</p>
  
  <pre><code>Error:(27, 28) error: Something went wrong: Unexpected error in AndroidAnnotations 4.2.0!
  You should check if there is already an issue about it on https://github.com/androidannotations/androidannotations/search?q=java.lang.ClassCastException&amp;type=Issues
  If none exists, please open a new one with the following content and tell us if you can reproduce it or not. Don't forget to give us as much information as you can (like parts of your code in failure).
  </code></pre>