I have the following design in my app
- there is a BaseActivity where I perform some common tasks
- All other activities extend BaseActivity so as I need not replicate the code for common tasks across all other activities.
- One such common task defined in BaseActivity is a login operation where a user logs in to his/her account. Since there are some backend database operations involved, I am using AsyncTask while writing those methods.
Now my problem is that in my child activities, if I invoke the login method of BaseActivity, then how do I pass the control back to my child activity. Login method can be called by any activity across my app, hence every activity will need a confirmation back from BaseActivity about the successful login so as specific tasks in those child activities can be performed.
Any suggestion/help is very much appreciated