what is AsyncTask in Android?

AsyncTask -> an alternate aproach for using thread and handler togather

  It provides methods that replaces behaviour of thread and handler classes.

 The important method in AsyncTask class are
 1) doInBackground( input )- it is alternate to      run() method of thread. but also has     input type and return type.

 2)publishProgress( input )-> it is used as alternate to sendMessage() method of handler. But it can take any data type as input.

 3)onProgressUpdate(input) ->this method replace handleMessage() method of Handler.

 4)onPostExecute(input) -> recieves whatever is return from doInBackground() as a final value.

 5) onPreExecute()-> it executes just before doInBackground(). and used for any initialization


AsyncTask requires Types to be declared for Input data, intermediate data and final return type of doInBackground();




Check Tis Out:

  
Online Practice Test 190 Android App Development MCQs



84 MCQ Android App Development Test

77 Most IMP Android MCQ's For Your Exam [solved] 

 50+ Android - Solved MCQ's [Topic Wise Sorted]

105 Solved Android Objective Questions 

Android mcq questions and answers pdf

what is android Alarm Service? 

what is Android Adapter View?

what are Android Implicit Intents?



Comments

Popular posts from this blog

Top 16 Mobile App Development Companies in India | App Developers 2017

CCEE CDAC Exam Questions

CDAC CCEE EXAM Prepration Link/PDF [Syllabus Topic Wise ] C++ & DS