我收到如下所示的2个动作:
@Receiver (actions = MY_ACTION)
protected void myMethod(){
methodA();
}
@Receiver (actions = MY_ACTION_SECOND)
protected void myMethod(){
methodA();
}
是否可以在1个接收器中设置2个不同的ACTION?
答案 0 :(得分:0)
@Receiver
接受一系列操作:
@Receiver(actions = {MY_ACTION, MY_ACTION_SECOND})
void myMethod(){
// do something
}
答案 1 :(得分:-1)
<强>已更新强>
尝试:
@Receiver ({actions = MY_ACTION, actions = MY_ACTION_SECOND})
protected void myMethod(){
methodA();
}