原文地址:
https://github.com/excilys/androidannotations/wiki/Receiving-intents
接收意图
@Receiver
注释通知你的代码的意图,而不必手工申报和注册一个BroadcastReceiver。例如:1
2
3
4
5
6
7
8
9@EActivity
public class MyActivity extends Activity {
@Receiver(actions = "org.androidannotations.ACTION_1")
protected void onAction1() {
// Will be called when an org.androidannotations.ACTION_1 intent is sent.
}
}