The foreground contains the applications the user is working on , and the background contains the applications that are behind the scenes, such as certain operating system functions, printing a document or accessing the network.
Read moreWhat is a foreground service?
Foreground services are an advanced Android concept which allows you to display notifications to your users when running long lived background tasks . The notification acts like any other notification, however it cannot be removed by the user and lives for the duration of the service.
Read more