- How to stop apps from running in the background on Android
- Jump to
- Why stop background apps on Android?
- Update your phone to the newest Android version
- Analyze battery consumption statistics
- Control your background processes
- I’m in! But I don’t know which apps to stop
- Task killers and RAM optimizers: the great debate
- Android ADB stop application command like «force-stop» for non rooted device
- 4 Answers 4
- What is the right way to close apps in Android?
- 6 Answers 6
- Activities don’t run in the background
- Cached background processes
- What about background apps?
- Summary
How to stop apps from running in the background on Android
Android smartphones have gotten very powerful over the years and are great at multitasking. Over time, however, you might have seen smartphones degrade in performance and become sluggish. You may also notice that the battery life is also adversely affected. What if we tell you that on most phones, these issues can be fixed by simply optimizing the background apps? Read on to find out how!
Jump to
Why stop background apps on Android?
For those of you who chanced upon this article without actually facing an issue with their phone, you might wonder why would someone even consider to stop background apps. Here’s an explanation.
As you keep using your Android phone, you tend to install several apps on your device. Over time, chances become high that at least some of them aren’t well optimized for your phone or may have a bug. Some of these apps may even contain malware – especially the ones you did not download from trusted sources.
Oftentimes, these apps may keep running in the background even after you thought you closed them. The result is sluggish performance and a marked reduction in battery life. Let us now check out the various steps that can be taken to solve this problem and stop background apps on Android.
Update your phone to the newest Android version
In case you have a relatively old phone with you, the simplest way to stop apps from running in the background is to make sure your phone runs the latest version of Android. Starting Android 10, Google has introduced several power management features that prevent errant apps from consuming too much power or hogging too much power.
Android 11 is the latest stable version of Android and provide great battery optimization tools/ © Mr.Mikla / Shutterstock.com
If you are on a newer version of Android (the latest stable version is Android 11) you are already doing pretty good as Google has enhanced power management features even further. On phones running Android 10 and 11, it would be a good idea to turn on a feature called Adaptive Battery. On phones running stock Android, you can enable Adaptive Battery by going into Settings -> Battery -> Adaptive preferences.
Apart from optimizing errant apps, the Adaptive battery mode also optimizes the charging speed of your phone to ensure that your battery lasts a long time.
Analyze battery consumption statistics
There is no denying that Android offers a comprehensive battery statistics tool where you can see what apps are draining the battery the most. To access the battery stats page tap on Settings -> Battery ->View battery usage.
The phone will now open a page with the list of apps that are consuming power. What is helpful about this page is that it lists these apps in an order — with the ones consuming the most power placed at the top. Chances are high you will see some of your most used apps high up in the list. However, if you note some third party apps that you know you haven’t used for a long time in this list, it might be a good idea to either force stop or uninstall it.
The Battery stats page is a veritable goldmine of information/ © NextPit
To force stop or uninstall an app, tap on the app and and you will see a page with both these options. Note that you may also see some apps here that are part of Android and Google Mobile Services. You can ideally leave them be since they are essential for the smooth and stable functioning of your phone.
Control your background processes
Incase you are not too happy with the results of disabling apps listed within the battery stats menu, it’s time to try out slightly advanced steps. The best way to gain control of your processes is to have a dig around under the hood using the monitoring tools built into Android.
In some cases, before you can start, you need to enable developer options.
- In most versions of Android, this involves going to Settings > About phone and then tapping Build number about seven or so times. You’ll get a notification telling you that Developer options have been unlocked once you’re done.
- For many handsets, the next thing you need to look for is a setting called Processes, Process Stats, or Running services. You can find this in Settings > System > Advanced> Developer options > Running services. That option takes you to a list of running processes showing how much RAM each is using.
- Obviously, it’ll be tempting to stop the most RAM-hungry apps from running in the background, but you’ll want to pay some attention to what you’re stopping before you go ahead. Stopping some apps might crash your phone.
- You can also tap the settings option when in the Services/Processes menu to switch between running processes and cached processes.
Control Android services from within Developer options / © NextPit
I’m in! But I don’t know which apps to stop
OK. If you don’t want your app/phone to crash, err on the side of caution and use some common sense. The app marked ‘Google Services‘, or pretty much any app that starts with ‘Google’ shouldn’t be manually stopped.
On the other hand, if you look through the list and see messengers and music players idly draining your battery in the background, then you can go ahead and stop them in relative safety. Truly crucial apps usually won’t allow you to force stop them anyway.
- To stop an app manually via the processes list, head to Settings > Developer Options > Processes (or Running Services) and click the Stop button. Voila!
- To Force Stop or Uninstall an app manually via the Applications list, head to Settings > Apps > All Apps and select the app you want to modify.
- Don’t delete any apps that appear when you select the Show System Apps option. You can see system apps by tapping on the three dots on the top right corner.
Apps that you rarely use are better off uninstalled altogether. / © NextPit
Task killers and RAM optimizers: the great debate
With Android software and hardware improving over time, some people will argue that the use of task killer apps is going to do more harm than good in terms of processing and battery life. As one of the problems you’re trying to fix is apps running in the background draining your resources, adding another one that has the purpose of doing explicitly that (it needs to monitor the services in use on your phone, therefore always needs to be running) seems a bit counter-intuitive.
A task killer that repeatedly force-closes an app in the background over and over is almost certainly going to drain your battery more as it continues the ‘restart and kill’ process. You might be better off not installing the task killer in the first place and just letting it run.
So there you have it! We have discussed several ways in which you can can stop background apps from running on Android devices. We hope the steps mentioned here proved helpful for you. In case you know if any other cooler methods that we might have missed out, share them with us in the comments below!
This article was comprehensively updated in July 2021. Older comments have been retained.
Источник
Android ADB stop application command like «force-stop» for non rooted device
I’m trying to stop application on Android 2.3.7 device. But in this version of Android I can’t use «force-stop» command. Do you know any other ways to close application on non rooted device?
4 Answers 4
The first way
Needs root
adb shell ps => Will list all running processes on the device and their process ids
adb shell kill
use process id of your application
The second way
In Eclipse open DDMS perspective.
In Devices view you will find all running processes.
Choose the process and click on Stop .
The third way
It will kill only background process of an application.
adb shell am kill [options]
=> Kill all processes associated with (the app’s package name). This command kills only processes that are safe to kill and that will not impact the user experience.
Options are:
—user | all | current: Specify user whose processes to kill; all users if not specified.
The fourth way
Needs root
adb shell pm disable
=> Disable the given package or component (written as «package/class»).
The fifth way
Note that run-as is only supported for apps that are signed with debug keys.
The sixth way
Introduced in Honeycomb
adb shell am force-stop
=> Force stop everything associated with (the app’s package name).
Источник
What is the right way to close apps in Android?
I’m new to the Android platform, and this is probably a dumb question, but.
How do you close an app?
When I’m in an app, and I want to get out, I just click on «Home» and move on, but I just installed a Task Manager app, and I noticed everything is left running.
Is there a way to exit apps? Or do I need to use the Task Manager every time I exit something?
6 Answers 6
If you exit the app using the BACK button then it will call onDestroy() on the current Activity, If you press HOME it only calls onPause()
Don’t be too worried about it though, Activities won’t drain battery they are just left in memory so they can be opened faster in the future.
I wouldn’t recommend using one of those task killer apps Android is designed to keep that stuff in memory for a reason, using a task killer is only one more extra service tugging away at your battery.. What you need to watch out for is apps that run services in the background like twitter or email clients pulling their servers, any good app that has a service like that will have an option to turn it off.
I’m pretty sure that everything I’ve ever read says that the Back button is the right way to exit out of apps.
Pressing Home leaves them running in the background until Android decides that they’re not needed any more, which can be handy if you just need to switch between apps to check something (holding Home for a couple of seconds gives you the list of recently running apps you can switch back to on most phones) but coming out using the back button tells the app that you want it to close.
Some apps have an «Exit» option in their menus. Most don’t.
You don’t really need to worry about it. You can just go to whatever app you need next. Android does a pretty good job freeing up resources when required.
Activities don’t run in the background
In Android, activities (that is, the part of the app you can see) never run in the background. They can only run (and use battery power) while they’re on the screen. The activity stops running regardless of whether you use home or back to leave it. The only difference is what data Android asks the app to save, so neither option is «the right way». It just depends on what you want to do.
If you use home, Android leaves the app in the same state, so that if you come back to it later (e.g. through the recent apps list), it’ll still be in the same state you left it: on the same screen, with the same stuff shown. For example, if it’s an email app, and you were looking at one email, then it’ll remember which email that was, and show you the same one.
Eventually (after about half an hour), Android concludes that you’re not coming back to the app, so it resets this state: next time you start the app, it’ll start from the front/main screen. To continue the example, the email app will forget which email and folder you were looking at, and show you the inbox.
If you use back, you’re telling Android that you don’t want to come back to this view. It’ll destroy the information about what you were looking at right away. Next time you start the app, it’ll show the front screen (e.g. the inbox).
As others have said, apps can control the behaviour of the back button: for example, web browsers use it to go back in the browser history. What I’ve described is the default behaviour of the back button, and developers are urged to keep the behaviour like that to avoid being confusing.
Cached background processes
Whichever method you use, Android will leave the app in memory (but not running) for as long as it can. This is to be more efficient. When you come back to the app, if it’s still in memory, Android can run it again right away; if it isn’t still in memory, then Android has to spend time and energy loading the app from storage again.
In old Android versions, apps left in memory in the background this way were included in the list of «running apps». This is a little confusing for users — it makes people think the app is really still running — so newer versions call these apps «cached background processes», to make it clear they’re only cached, not running.
What about background apps?
Earlier on, I said that activities don’t run in the background. So how does your email client check for mail? As well as activities, apps can have services. Services don’t have any GUI for you to see or interact with, but they do run in the background. Usually, a service will only run infrequently, such as to check mail once an hour, but it’s possible for the app developer to run the service all the time, draining your battery.
Leaving an activity with back or home doesn’t change how Android treats any services from the same app: the service can continue to run, or be triggered later at a given time (next time the mail check is due).
Summary
In summary, it doesn’t really matter whether you use back or home: it only changes what the app shows you next time you run it. It doesn’t have an effect on battery use. Neither of them corresponds to «exiting» a program on your PC.
Источник