For some basic use cases, like notifications and downloads, there is a special system or api that allows your app to do that in the background without actually running.
If you want to play audio or track gps in the background you need to do things yourself though.
If you want to play audio or track gps in the background you need to do things yourself though.