Android force Stop callback to application?

后端 未结 3 984
温柔的废话
温柔的废话 2020-12-21 03:38

If an app is forced stop by following the steps Settings->Application->ManageApplications -> --> Force Stop , Does android call the onDestroy of the Activity or the Applica

3条回答
  •  执念已碎
    2020-12-21 04:01

    No. This isn't really possible. I haven't looked at the Android code in question, but I would imagine that "force stop" is just calling kill on the process ID of your app. So the only way you could intercept that is if you could trap signals, which I don't think Android allows.

    If you were rooted, you could possibly do this, but not in any standard way.

提交回复
热议问题