title: Android Model-View-Presenter(MVP) How to Return Long-Running AsyncTask
body: <p>I am somewhat new to <code>Android</code>, and I am writing an app. I am getting to the point where I am starting to more thoroughly test my code, and therefore, I would like to implement the MVP design strategy since it adds more testable layers to the code. One of the supposed benefits of using MVP that I can not seem to understand is how it helps with running <code>AsyncTasks</code> as they are performed dynamically. Since you want to avoid any <code>Android</code> specific components in your <code>Presenter</code> class, how are you supposed to reference the <code>Activity</code> that utilizes the <code>AsyncTasks</code>? Tutorials about MVP show the <code>Presenter</code> object having methods that take in an <code>Activity</code> as a parameter and return to it; however, if your <code>AsyncTask</code> takes a long time and your <code>Activity</code> has been destroyed through something such as rotation change, how do you return to the proper <code>Activity</code>? I currently store my <code>AsyncTask</code> in a <code>Fragment</code> so that it is saved on Orientation Change. I am having a hard time finding a workaround that implements the MVP practice. </p>