Skip to content Skip to sidebar Skip to footer

How To Let A Thread Communicate With Another Activity Thread

i'm beginning to learn android, i meet a problem in my project, in my application,i create a background thread which get data from remote server by UDP, in this thread ,i will

Solution 1:

You should take a look at this article about painless threading in android, and pick a solution that best fits for you.

If you retrieve data from the server repeatedly, maybe you should go with a Service - Handler solution, but AsyncTask seams to be the easiest for me.

Solution 2:

I would recommend you to go through the dev guide as suggested by @UBM. Also, if you are looking for different threading constructs and communication, I would strongly recommend you to look at a series of articles on Android threading constructs starting with this article.

Post a Comment for "How To Let A Thread Communicate With Another Activity Thread"