2

First of all, I have permission management installed on my custom rom and this prevents apps from randomly starting up during boot.

However, I have noticed that this is not enough to prevent some applications from running when my wifi is turned on. Why is this a problem? I found my Android seems to lag for a few seconds whilst the wifi is being turned on. So I went searching for a solution but there doesn't appear to be anything other than to use a different set of applications.

I think the problem might have something to do with connectivity monitoring (http://developer.android.com/training/monitoring-device-state/connectivity-monitoring.html & https://stackoverflow.com/questions/7094606/android-stop-start-service-depending-on-wifi-state).

Even after choosing to force stop the application, when I turn on the wifi, the app starts again. I noticed that even the Youtube app does this, although it is less obvious as there are no services running on the services tab. One of my apps does have a service running in the background and was the key reason why I decided it was time to ask if there was a solution to prevent applications from running except when I choose to open them.

Has anyone found any solutions to this problem yet?

  • Why have you tagged this question with malware? If there's malicious software on your phone, you need to remove it, not worry about what apps have tasks to do when the network becomes available. – Dan Hulme Mar 23 '14 at 10:03
1

It seems like you're making this problem for yourself.

As designed, apps can ask Android to notify them when a network connection appears or disappears. Some apps might want to be notified when they're running in the foreground, but some apps might need to be notified whether they were already running or not. This is necessary for the correct functioning of the app.

It wouldn't normally cause any lag, because background services always run at a lower priority than the foreground app. When an app finishes running normally, Android caches it in RAM, so that next time it starts (whether it's a foreground activity or a background service), it can start immediately, using less battery. But if you routinely force-stop apps, or use a "task killer" or the "Background process limit" option in the developer settings to stop them, then next time the same app starts, Android has to spend time and energy loading it from storage again, causing lag.

So my recommendation for how to stop your phone lagging when you connect to Wi-Fi is that you should let Android do its own job of managing processes, and stop trying to micromanage it. Leave that force-stop button for cases where a buggy app has gone out of control.

For more information on why task killers slow your phone down, see the answers to How can I stop applications and services from running?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.