Everything works except when it reaches till the last part of the code with \"Successfully Registered!\" then the error as mentioned in the title appears inside the registerDial
You do some UI work in your doInBackground
, for example this call
rAuth.setTextColor(Color.GREEN);
Move this code to the onPostExecute
method.
I'm guessing that rAuth
is a TextView
. This needs to be moved to the onPostExecute()
as you can't update UI
elements in the doInBackground()
. Only the onPostExecute()
, onProgressUpdate()
and onPreExecute()
run on the UI
thread.
Here is Link to Docs