Search code examples
androidserviceandroid-activitybackground-service

Android background service launched from activity


i was seeing this turorial about how to launch service from activity My question is: if user that uses my app close my app, service will continue to run or the close of app stop the service? i want to implement my notification service.


Solution

  • See Service Lifecycle from the official docs for a detailed explanation on how long the service will run.

    In most cases an app can't really close unless all its started services are closed.