1.

What is the difference between Bound Service and Intent Service

Answer»

There are many differences between IntentService and Bound Service:

  • Intent Service is performing the task in background and after finishing the task, the instance of IntentService will be killed itself.
  • Bound Service is running in Main THREAD, while IntentService creates a worker thread and uses that thread to run the service.
  • IntentService is USING Handler to HANDLE Message. While Service class needs a MANUAL STOP using stopSelf().
  • IntentService implements onBind() that returns null. This means that the IntentService cannot be bound by default.
  • IntentService implements onStartCommand() that sends
  • Intent to queue and to onHandleIntent().


Discussion

No Comment Found

Related InterviewSolutions