Sunday, February 9, 2014

(Anxious ...) seek to solve a small problem big God android, my android program there is a button, the next point after the action button to networking, so can not operate directly inside the main thread


            
As stated, anxious. . . . . . . . . . . .
Reply:
Then open a thread, open a back-office services, go to networking ah. . . I also do this.
Reply:
 new Thread () {
public void run () {
/ / Here you can put things on the
}} Start ();.

Reply:
Open thread to open a back-office services
Reply:
I know you want to open a new thread, and services, but I also want to communicate after it opened, for example, three button, every point I let him send what data, which is the main thread of information to be passed, and how it is passed over
Reply:
Threading, asynchronous tasks can. Threads which can access data members ah.
Reply:
handlerThread, should be called the name of it, and then synchronize via message. Understand the next handler and looper to know
Reply:
reference to the second floor siyehua reply:
 new Thread () {
public void run () {
/ / Here you can put things on the
}} Start ();.

Positive Solutions
Reply:
You have to be able to novice ah. .

No comments:

Post a Comment