I have read certain posts and done by myself and i found that on my device android kitkat 4.4.4 when i swipe the app from recent screen the foreground service doesn't stop, So does this behavior present on every version of android os or in some version foreground services are killed ?


Yes, this clear the App from the RAM(memory). This is valid from the Android 5.0+. The foreground services are definitely stopped if executing. Same does not affect any background services if any running.

| improve this answer | |
  • How did you verify that? – Firelord Feb 28 '16 at 0:42
  • Personal XP. When you run an app, say a game, and press home button 🔲. Home screen is shown, and as you go back to game by pressing recent key, game still runs. But, instead, if you clear the recent and then try and open the game, the game starts from beginning. – Rahul Bali Feb 28 '16 at 5:57
  • @firelord above shows that the Game was cleared from memory. – Rahul Bali Feb 28 '16 at 5:59

No, the only effect of removing a task from the "recent tasks" list is to remove the entry from the list. It doesn't have any effect on Android's process or memory management.

| improve this answer | |
  • 5
    That's not entirely true. Compare your process list before and after swiping an app away. If there is a service in the background, not very much happens, but if there isn't you usually see that specific process die and releasing all its resources (just tested with some apps on my device). – GiantTree Feb 27 '16 at 15:41
  • @GiantTree can you list the name or link the apps? It would be interesting to test and see whether Dan's claim holds or yours. :-) – Firelord Feb 28 '16 at 0:41
  • 1
    @Firelord Facebook Lite (only the background service reappers, the main process dies), Logcat Extreme, Google Chrome, Camera, Settings. Usually all apps that don't have persistent services running are killed less than a second after swiping them away. – GiantTree Feb 28 '16 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.