hello there can someone help me here, im newbie in...
# android
j
hello there can someone help me here, im newbie in kotlin
g
Help with what exactly? Please, add some context or at least question. Also, pesase, use backticks
` to format your code:
Copy code
like this
🙏 2
f
It seems like you are using only one method that AsyncTask provides. Also you are trying to update ui thread after job is done ( in your case it's a network call) and for that a perfect method that you might consider is onPostExecute. Also because you are using .execute() it blocks the thread but as far as I remember using Call.enqueue() will do it in the background for you, so basically there is no need to use AsyncTask here to make that call. So to sum it up. Extract that what you have in doInBackGround method to a method. Then make the call by using Call.enqueue() for better error handling. Then update your ui according to the result you get.