Threading Example in Android [closed]

Closed. This question is seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. It does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.

Closed 9 years ago . I want some simple example on thread creation and invoking of threads in android. 1,471 17 17 silver badges 25 25 bronze badges asked Jan 18, 2011 at 10:28 3,507 10 10 gold badges 34 34 silver badges 47 47 bronze badges You can refer to this post too : stackoverflow.com/questions/9148899/returning-value-from-thread Commented Aug 29, 2017 at 10:27

3 Answers 3

This is a nice tutorial:

Or this for the UI thread:

Or here a very practical one:

and another one about procceses and threads

16.8k 9 9 gold badges 72 72 silver badges 109 109 bronze badges answered Jan 18, 2011 at 10:29 RoflcoptrException RoflcoptrException 52.3k 35 35 gold badges 153 153 silver badges 200 200 bronze badges The first two links are not working.. For the first link, try link For the second link, try link Commented Jun 27, 2012 at 14:57 The answer is almost 1.5 year old. I try to update the links. Commented Jun 27, 2012 at 18:34 you are really nice to have answered an unspecific question such as this Commented Mar 29, 2013 at 16:44

I'd disagree that it is a non-specific question: it's asking the community for a very particular type of example, with a very particular focus.

Commented Nov 14, 2016 at 22:07

One of Androids powerful feature is the AsyncTask class.

To work with it, you have to first extend it and override doInBackground (. ). doInBackground automatically executes on a worker thread, and you can add some listeners on the UI Thread to get notified about status update, those functions are called: onPreExecute() , onPostExecute() and onProgressUpdate()

You can find a example here.

Refer to below post for other alternatives: