What is IntentService in Android?

IntentService :- The IntentService class is a base class for Service that handles asynchronous requests on demand. It is started just like a normal service; and it executes its task within a worker thread and terminates itself when the task is completed.

the method we implement in this class is onHandleIntent() method, which is executed on a worker thread.This is where you place the code that needs to be executed on a separate thread. When the code has finished executing, the thread is terminated and the service is stopped automatically.

No comments:

Post a Comment