How to Stop Apps Running in Background on Android Programmatically | Try It


It is safe to say that the famous smartphone operating system, Android has changed people’s lifestyle altogether. It has made many things easier. It has made people connect to each other better, made shopping better, made navigating the roads easier, made data transfer faster, brought DSLR like camera abilities at a cheaper rate, the list goes on. It is being developed with the oversight of Google, and the tech giant has made sure to bring new capabilities and features as the years went by. The last decade has thus been very good for the phone to stop apps running in background android programmatically

That being said, Android still has a lot to improve on. As applications became heavier, an average Android smartphone still hangs under prolonged use. Memory management and process handling is still an issue, mainly on the low-end devices. The technology will surely improve, and we have a lot to look forward too. This article will tell you how to prevent apps from running in the background on Android OS programmatically.

Why Do Android Apps Run in the Background?

This is a sure question that is lingering in your mind. Why do the Android apps run in the background when you have closed it? This is because it needs to do it. The app developers coded it to run in the background to serve its purposes, and the Android system is supposed to provide sufficient resources to it.

androidpit-hero-s7edgeLet us look at the example of an instant messaging app, say Whatsapp. Even if you close the app and clear it from the recent menu, you can see that it still runs in the background and uses data and memory. This is because whenever someone messages you, Whatsapp needs to notify that to you in real time. It is the purpose and duty of Whatsapp to keep you connected in real time. You surely would not like if you read an important message hours after it has been sent. This is why by default, Whatsapp will autostart if you close it and run in the background.

But this takes valuable memory, and you don’t want less important apps doing this and slowing your phone down. Luckily you can kill an app completely. Here is how to stop apps running in the background on Android programmatically.

how-to-block-internet-access-in-specific-apps-on-androidHow to stop apps running in the background on Android programmatically

Try these methods to prevent apps from running in the background:

1. Force Stop Manually

This is the most effective way, but it takes some time to do it. First of all, to identify which are the running processes go to.
Settings > Developer Options > Processes
The actual path may vary upon the ROM and manufacturer. But it won’t be hard to find. In this page, you can see all the running apps. To stop the apps running in this background, open the app settings and click on force stop. This will effectively stop the app, and it will not restart unless you open it. Make sure you are killing an app you know of. Killing a system process may crash the whole thing. You can also get to app settings of a specific app by long pressing on it in the recents menu.

2. The Doze feature

This is a new feature that got introduced with the Android marshmallow and helps to save a lot of battery. Enable this inside the battery settings by tapping the three dots and choosing battery optimisation. Choose the app that you want to control and click on optimise.
This app will now be frozen when you are not using the device that is when the screen is not ON. A very useful feature that saves a lot of memory and battery.

3. Greenify

If you are a rooted user, then go ahead and install Greenify from the Play Store. Open the app and select the apps that you want to stop apps from running in the background and click on hibernate. Greenify will now prevent those apps from running in the background.

4. Update to Android Oreo if it’s available

The latest stable version of Android, Android Oreo has a new feature called Background Execution Limits. This effectively restricts app from running in the background and take up resources. But Android oreo is yet to reach many devices, and only apps that are updated for oreo is affected by this feature. But we surely will have better app management in the future.

Note: Never use task manager apps that claim to free up memory or speed up your device. Android by design is capable of managing its tasks, and these apps create more problems than they solve. They kill processes which restart soon enough and waste valuable resources. It is better to avoid such apps.

Android Background AppsConclusion on how to stop apps running in the background

Android devices are known to slow down when a lot of apps take up its RAM. This is why clearing and stopping apps running in the background is very important. Hope this article helped you to speed up your Android device.


Please enter your comment!
Please enter your name here