I execute the following code that does not execute if I rotate the screen:
AsyncHttpClient client = new AsyncHttpClient();
client.get(absoluteUrl, params, responseHandler);
It surprised me that the network request was cancelled because if I used a custom asynctask to make a network call using, say, URLConnection it would still run even after the activity was destroyed. Am I to understand that loopj's AndroidAsyncHttp cancels the network request when the activity is destroyed? How can I prevent this?
I need more information to help you. What I can tell you is that by default android destroys and recreates an activity on rotation.
If you specify the following in your android manifest:
The activity wont be destroyed but onConfigurationChanged will be called instead.
Hoped this helped 8=)