
Example of Started and Bound servicesįor instance I play audio in background, startService() method is called. When unbindService() method is called the component is unbind. 2) Bound ServiceĪ service is bound when bindService() method is called by an activity. It is stopped when stopService() method is called. Examples include handling of network transactions, interaction with content providers, playing music.Ī service is started when startService() method is called by an activity. These perform task even if application is destroyed. Submitted by Shamikh Faraz, on April 28, 2018Ī service is a component that runs in the background for supporting different types of operations that are long running.



In this tutorial, we are going to learn about services in Android, this tutorial contains definition, types of services, methods which will be used in the example and an example of android services.
