Is there a way for us to receive events such as onResume
, onWindowFocusChanged
, etc., from outside the activity? I would like to run some code when these events are raised in another class, which only has a reference to the activity.
EDIT: In my case, I can't modify the Activity class, or override it in a subclass.