What is the difference between Service, Thread and AsyncTask?
Thread TagsAdobe Illustrator Adobe InDesign Adobe Photoshop Android Development Android Programming Android Studio Automation Testing C / C++ Programming Career Options College Lounge css digital marketing Digital Marketing / SEO Fireworks Graphic Design Graphic designing Graphics Design Graphics Designing HTML? Illustrator Internship Training logo Design logo designing Magento Photoshop PHP Programming QA react-native Scroll Website SEO Single Page Website Stock Managment System Testing Typography UI UI/UX Development UI Design UI Designing UI development User Interface UX Design Web Designing Website Design Wordpress wp
Log in with your username and password
Register for free!
Registration at Smart Mentors is completely free and takes only a few seconds. By registering you’ll gain:
- Full Posting Privileges.
- Access to Private Messaging.
- Optional Email Notification.
- Ability to Fully Participate.
- Author Replies
- January 18, 2019 at 11:54 am #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.
You must be register. Registration is 100% free.to reply to this thread.Please or