What is the difference between Service, Thread and AsyncTask?

This thread contains 1 reply, has 2 voices, and was last updated by Nitesh User Do not delete 5 years, 6 months ago.

  • Author Replies
    • #52176

      What is the difference between Service, Thread and AsyncTask?

    • #52177

      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.

      Nitesh Bavishiya

Viewing 1 reply thread

You must be to reply to this thread.Please or . Registration is 100% free.


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.


Copyright 2016-2024 Smart Mentors. All Rights Reserved.



Sign up now to Become An Instructor

    Register your Interest

      cf7captchaRegenerate Captcha