I noticed such a strange thing: after closing the application (swiping with a finger in the task manager) and after stopping the service using the stopService method, the processes of applications and services hang in the Android Device Monitor . Apparently, because of this, I have problems, because Application and the application does not close. So why do applications and services hang in the background, and how to program kill them?

  • @metalurgus, I have a problem due to not closing the application. But oh well, it’s impossible - it’s impossible. Add to the answer. - user189127
  • Describe the problem in a new question. I am sure there is a solution for her too. - Vladyslav Matviienko
  • @metalurgus, already ... - user189127

1 answer 1

The simple answer is no way. It is not in your jurisdiction.
When and how exactly to kill processes - the system decides. You also need to organize your application so that it does not have problems when re-opening / restoring, and so on.