Sunday, March 4, 2012

Services in Android

A service is an application component that can run some long running task in the background without the need for a user interface.

NOTE: Services run in the main thread of their hosting process.

Why Services in Android?:
A Service is use :
  • to tell the system about something our application wants to be doing in the background.
  • to expose some of its functionality to other Components of our Application.
  • to expose some of its functionality to other third party Applications.
Forms of Service:
  • Unbound(Started) Service:
    When an appliction component start an service by calling startservice() method, service is called started service.
  • Bound Service:
    When an appliction component start an service by calling bindservice() method, service is called bound service.

0 comments:

Post a Comment

 
Powered by Blogger