Destroy Android App

I developed an application that works great.

In that I used some static variables, and also set application level variables. My problem is that even after setting finish () for each action, the application is displayed in runtime.

After closing the application, when I started the application after some time, it will install the latest changes.

How can I destroy my application?

+3
source share
5 answers

I checked that the application does not free resources. So what I did:

Process.killProcess(Process.myPid());

He will kill the application. It helps me a lot.

+3
source

I think the correct answer is "you shouldn't."

, , . Android , .

, , .

+12

System.exit(0);

OnDestroy()

, .

+3

, onDestroy .

-, - ?

0

,

setResult() finish() onActivityresult()

setResult() , , onActivityResult() .

The solution given by oli is the correct one and android will destroy your application. But I want to add only if it lacks system resources.

For more help, click on the following link.

http://developer.android.com/reference/android/app/Activity.html

0
source

Source: https://habr.com/ru/post/1758341/


All Articles