activity to activity callback listener
问题 Let's suppose 2 activities Activity1 and Activity2 . I need to call method methodAct1() (inside Activity1 ) from methodAct2 (inside Activity2 ). I think it should work using callback listener - I don't want to use EventBus libs! I get java.lang.NullPointerException using this code: interface: public interface MyListener { public void listen(); } Activity where event is created: public class Activity2 extends Activity { private MyListener myListener; public void setUpListener(MyListener