Home Forum
Welcome, Guest
Username Password: Remember me

How do you quit an Android app?
(1 viewing) (1) Guest
Chat about general Android stuff
  • Page:
  • 1

TOPIC: How do you quit an Android app?

How do you quit an Android app? 3 years, 4 months ago #83

I downloaded a load from the Marketplace and when I do a long press on the home key see many of them are still running. So I switch to one and press back, but a long press on home shows its still running. If the system is deciding which to quit thats not too useful, say one is a WiFi scanner and drains the battery so you really want to quit that, or another is a paused game where you're not so bothered about it. There must be a way to really quit these apps, not just background them and let the system stop them when it feels like it.

Re:How do you quit an Android app? 3 years, 4 months ago #87

Is it still running or is it just a quick access to the most commonly used applications? I also thought it was like UIQ devices where the applications don't actually close until the resources are required elsewhere but it looks like it does actually close.
I've just been looking into this today and it appears that the application fully restarts when you select the icon. I'm still trying to determine if the application is actually running or not. Finish() has been called in my application so it should be killed
  • StephenL
  • OFFLINE
  • Freshman
  • Posts: 9
  • Karma: 0

Re:How do you quit an Android app? 3 years, 4 months ago #88

android:excludeFromRecents="true"


Has to be included in the Android Manifest to stop it being displayed in the recent apps pane. Looks like they have omitted this (the people that developed the apps you downloaded) and that it does just display recent apps & not running ones. Unless anyone else can confirm the apps are still running?
  • StephenL
  • OFFLINE
  • Freshman
  • Posts: 9
  • Karma: 0
Last Edit: 3 years, 4 months ago by StephenL.

Re:How do you quit an Android app? 3 years, 4 months ago #89

The app lifecycle stuff applies here, see code.google.com/android/reference/androi...ml#ActivityLifecycle. If the app is backgrounded then onPause() will have been called, and you'd have hoped battery-draining activities would pause also. If there really is a need for them then the app should be written using the service model and a front end UI app used to control it.

You can can indicate to the system the app is to be killed by calling finish(), but there is no guarantee when it will be released from memory. Of course your app should stop what it is doing when it gets that message and clean up, so the fact its "ghost" lives in Androids memory space for a while is irrelevant.
  • ticktock
  • OFFLINE
  • Professor
  • Posts: 79
  • Karma: 6
  • Page:
  • 1
Time to create page: 0.27 seconds
Copyright © 2012 Android Academy. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
 
Glossary
We have 21 guests online