I am making an app and I am putting the final touches on it and i was wondering, if the user presses the “home” button while the application is running, then clicks on the icon to try to run it again, what will the app do? Will it bring the current app to the front? Will it run a new instance? I am wondering because my app has a lot of threads and if the user was running 2 instances of my app it would kill their battery life.
Share
It depends on the
android:launchModeof your activity, set in the Manifest.With the default setting the system always creates a new instance of the activity in the target task and routes the intent to it.
See the reference for detailed info.