Forum

What is the difference between Service and IntentService? How are they used?

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

  • Author Replies
  •  Test
    #52884

    What is the difference between Service and IntentService? How are they used?


  • #52885

    Service is the base class for Android services that can be extended to make any service. A class that quickly extends Service runs on the main thread so it will block the UI (if there is one) and should therefore either be used only for small tasks or should make use of other threads for longer tasks.

    IntentService is a subclass of Service that manages 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. Writing an IntentService can be quite easy; just increase the IntentService class and override the onHandleIntent(Intent intent) method where you can manage all incoming requests.


    Regards,
    Nitesh Bavishiya

You must be to reply to this thread.Please or . 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.

SUBSCRIBE TO OUR NEWSLETTER

Contact Us

Working Hours

  • Monday9:00 AM – 9:00 PM
  • Tuesday9:00 AM – 9:00 PM
  • Wednesday9:00 AM – 9:00 PM
  • Thursday9:00 AM – 9:00 PM
  • Friday9:00 AM – 9:00 PM
  • Saturday9:00 AM – 9:00 PM
  • SundayClosed
Copyright 2016-2019 Smart Mentors. All Rights Reserved.

Login

FORGOT PASSWORD

Sign up now to Become An Instructor

Register your Interest