How to close Android application?

后端 未结 22 1201
小蘑菇
小蘑菇 2020-11-22 07:17

I want to close my application, so that it no longer runs in the background.

How to do that? Is this good practice on Android platform?

If I rely on the \"ba

22条回答
  •  孤街浪徒
    2020-11-22 08:08

    It's not possible using the framework APIs. It's at the discretion of the operating system (Android) to decide when a process should be removed or remain in memory. This is for efficiency reasons: if the user decides to relaunch the app, then it's already there without it having to be loaded into memory.

    So no, it's not only discouraged, it's impossible to do so.

提交回复
热议问题