Talk to people, I wonder if anyone can help me, I'm new to mobile I'm starting with Android. I am making a request with HTTP CLIENT to return the entire value of the page, whether it's web or my host. But before that I was making the call from my method that returns this data (method q I created) within the the main function of onCreate (), but after a few seconds, If it takes 3 or 5 seconds, the request may hang so I'm trying to use the Async Task to run my method that returns the contents of the request, inside the method ofInBackground () of my sub class PegaURL that is inside my main class MainActivity.
The problem that with my emulator in version 2.3.3 or 2.3.1 or 2.3 it works perfectly, but when running in version 4.0 or 4.4 it opens the application and when you click the button to execute the method the following error appears: My Application2 has stopped.