I've got a simple hiearachy of activities where: A is abstract and B,C, etc inherit from A. I need a place to handle network connection and it would be good to place it in the parent activity(A). However, I don't see how I can stop code in my child activities(B,C) from executing. Additionally, in each of the onResume methods of the child activities(B,C) I have extra network code which shouldn't be executed as well.
So, is there any way apart from "if" in parent onCreate + "if" in child onCreate + "if" in child onResume ? This approach should be more concise.