I am writing a server client on android platform. If one of the client send a message one of them, firstly message goes to server and server sends it to client. When a receiver client receive the message, i have to setContentView so I need to open messaging screen. But it takes the messages in a different thread and I pass as a reference my activity class.
Thread my = new MyThread(this);
and in the thread class ı cant set content view because give an error like ViewRoot CalledFromWrongThread what can I do?
1 Answer