Skip to content Skip to sidebar Skip to footer

How To Exit From An Android App?

I've just read that you can exit an android application by simply calling: finish(); However this is not the case! When I do this I get the following errors: PackageInstallationRe

Solution 1:

You might want to look at Quitting an application - is that frowned upon? thread here in SO.

Solution 2:

What are you trying to accomplish with an in app exit? If you want the app to not save state after the user exits you can add this flag to the main activity in the manifest file:

android:clearTaskOnLaunch=true

This will clear the activity stack when the application is reopened.

Post a Comment for "How To Exit From An Android App?"