Search code examples
androidkotlinandroid-asynctaskfindviewbyid

How can I use findViewById method inside AsyncTask?


I have an AsyncTask to execute while trying to connect the phone to a Bluetooth device, I want to change an icon from a button if it connects successfully

(I'm new to Kotlin programming)

Main Code

enter image description here

I would be very grateful if anyone could help.


Solution

  • Replace this with line 146 val [email protected](R.id.blue_btn)