Aim:
What is Service? Write down types of Service. Create an MP3 player application by using service by following below instructions.
- Create MainActivity and design according to shown in below image.
- Create Service Class and implement MediaPlayer Object
Ans:
Services in Android are a special component that facilitates an application to run in the background in order to perform long-running operation tasks. The prime aim of a service is to ensure that the application remains active in the background so that the user can operate multiple applications at the same time.
Types of service:i. Foreground Services
ii. Background Services
iii. Bound Services Light theme: