Tell us difference between Service, Intent Service, AsyncTask & Threads?
Submitted by: Muhammad☛ Android service is a component that is used to perform operations on the background such as playing music. It doesn't has any UI (user interface). The service runs in the background indefinitely even if application is destroyed.
☛ AsyncTask allows you to perform asynchronous work on your user interface. It performs the blocking operations in a worker thread and then publishes the results on the UI thread, without requiring you to handle threads and/or handlers yourself.
☛ IntentService is a base class for Services that handle asynchronous requests (expressed as Intents) on demand. Clients send requests through startService(Intent) calls; the service is started as needed, handles each Intent in turn using a worker thread, and stops itself when it runs out of work.
☛ A thread is a single sequential flow of control within a program. Threads can be thought of as mini-processes running within a main process.
Submitted by: Muhammad
☛ AsyncTask allows you to perform asynchronous work on your user interface. It performs the blocking operations in a worker thread and then publishes the results on the UI thread, without requiring you to handle threads and/or handlers yourself.
☛ IntentService is a base class for Services that handle asynchronous requests (expressed as Intents) on demand. Clients send requests through startService(Intent) calls; the service is started as needed, handles each Intent in turn using a worker thread, and stops itself when it runs out of work.
☛ A thread is a single sequential flow of control within a program. Threads can be thought of as mini-processes running within a main process.
Submitted by: Muhammad
Read Online Android Developer Job Interview Questions And Answers
Top Android Developer Questions
☺ | Explain me what is Context? |
☺ | Explain me what is the Android Application Architecture? |
☺ | Explain me scenario in which only onDestroy is called for an activity without onPause() and onStop()? |
☺ | Explain me how does the activity respond when the user rotates the screen? |
☺ | What are content providers? |
Top Mobile Technologies Categories
☺ | Android Interview Questions. |
☺ | Wireless Communication Interview Questions. |
☺ | 3G Interview Questions. |
☺ | iPhone Interview Questions. |
☺ | Mobile App Architect Interview Questions. |