I am porting a program to Android. I have all my business logic on POJOs, so I need to use Activities as a mere front-end.
The problem is that I don't know how to share POJO between Activities; I've tried with this, but it doesn't work:
class Activity1 extends Activity{
Logic logic=new Logic();
public Logic getLogic(){
return logic
}
}
class Activity2 extends Activity{
Logic logic;
public void onCreate(Bundle savedInstanceState) {
main = (Activity1) findViewById((R.id.Activity1);
logic= main.getLogic();
}
}
Please note that POJO is not for sharing data, it actually contains business logic.