user1145533
user1145533

Reputation: 697

Android application seems to continue running after exiting

This might be a bit of a stupid question but my application seems to stay running even after I have stopped it. I close it by holding down the home key and dragging the application off to the left. However, I still see logcat output, it only stops if I go to settings-->Apps-->Running Apps and stop it this way. Is this a bug in my application or is this expected android behavior?

Upvotes: 1

Views: 421

Answers (1)

Timmetje
Timmetje

Reputation: 7694

This is expected . Android behaviour

Unlike many other Operating Systems, Android does by default not have a dedicated button to close an application manually. This is because Android is designed to manage the running applications itself and close them as needed.

By design, Android handles the memory and time assigned to applications. This ensures that applications that are left opened do not cause the smartphone to slow down or run out of memory.

When pressing Home button, your app will go to the background and Android O/S will close it when low on memory. If not and you open the application again, it resumed where you left off. Unless you specifically create a method in your application that closes (finishes) your app.

Upvotes: 3

Related Questions