In an recent stackoverflow post, I commented that I have a library class called HttpPostAux.java
.
It works when I call it from Main.java (main activity) to validate user login (here I use an AsyncTask
thread to connect to server). But when I use it to replace old password in case user has forgotten it (here I use another AsyncTask
thread to connect to server), it gives me an error:
An error occurred while executing doInBackground()
... Caused by: java.lang.NullPointerException
But when I look for that null, surprise: I didn't find it! And in my humble opinion, this error shouldn't exist because HttpPostAux
isn't attached to any activity in particular.
Can anybody help me here? Which is the correct way to use different AsyncTask
threads in different activities? I would publish some code, but I'm out of time right now...
Thanks in advance!