I'm developing an Android application that consumes a PHP webservice through the ksoap2 library.
I'm currently querying the webservice with a class that extends an AsyncTask. But because it does the task in parallel with the Thread UI I'm having problems with the logic of the program.
Can I make requests to the webservice in a normal class that does not extend an AsyncTask?
The problem was that I was comparing the login data of my user object while AsyncTask was still updating this data. This meant that the user could not log in when entering their data. The solution was to make the comparison in the onPostExcute () of AsyncTask, very simple. Thanks for everyone's input and it really is much better to perform heavy tasks on a separate thread.