We can differentiate Service, Thread, and AsyncTask as per their use.
– Services are similar to Activity but it has no UI. Services are working in Background. i.e. If you want to fetch the weather information, for that you cannot create a blank activity for that, so you can use Service.
– A Thread is a class. It is a unit of execution who run parallel to the Main thread is relevant to flag that you can’t update a UI component from the main Thread. It fulfills the set of codes parallel to the main thread.
– AsyncTask is used for managing those tasks that you cannot make to work on the main thread. For example, an HTTP request is a very complex work that cannot be handled on the main thread, so you handle the HTTP request in the AsyncTask.
Viewing 1 reply thread
You must be logged in to reply to this thread.Please login or register. Registration is 100% free.
GET FREE CONSULTATION
Call Us Now For Free Consultation97370 05566
Our experts listen to you patiently and suggest you the right course after conducting a personality profile test. Register your interest below to schedule personality profile test for you.