Hi,
Doing some simple android networking. My problem is as stated above, i would like to change the UI from a separate thread.
What i would like to do is add "Client successfully connected" to the EditText i have. The connection to the server is handled by a separate thread, and that is why i would like to do this. Another reason is, i have a different thread always listening for to what the server says, and what ever the server does say i would like to show it in the EditText.
I have tried many methods, how ever no luck. That is why i am here.
I always get the following error:
Only the original thread that created a view hierarchy can touch its views
Thanks for any advice.
EDIT: Ran into another problem. My code involves socket connections. It works just fine on the emulator. How ever it doesn't work on my phone. It was working a day or two ago, then just magically stopped. LogCat simply says permission denied.
Doing some simple android networking. My problem is as stated above, i would like to change the UI from a separate thread.
What i would like to do is add "Client successfully connected" to the EditText i have. The connection to the server is handled by a separate thread, and that is why i would like to do this. Another reason is, i have a different thread always listening for to what the server says, and what ever the server does say i would like to show it in the EditText.
I have tried many methods, how ever no luck. That is why i am here.
I always get the following error:
Only the original thread that created a view hierarchy can touch its views
Thanks for any advice.
EDIT: Ran into another problem. My code involves socket connections. It works just fine on the emulator. How ever it doesn't work on my phone. It was working a day or two ago, then just magically stopped. LogCat simply says permission denied.