Go Back   Android Forums > Android Discussion > Android Applications
Android Applications All the information you could ever want about Android Applications. Learn about apps and get help with them... all here! New apps can be found and announced in the Applications Announcements forum linked below.

test: Reply
 
LinkBack Thread Tools
Old December 3rd, 2011, 02:26 PM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jun 2010
Posts: 12
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default App to stop process from running in background

I know that the Android OS handles memory well and closes apps when not needed. The problem is, some apps run processes in the background when Im not even using them. I dont want these processes running because it A.) Slows down my internet speed if the app is using it B.) It slows down my phone processing speed because the app is using precious cpu cycles

Here is a list of apps running in the background on my phone right now that I have no desire for them to be running unless I am using them.

- GetJar
- FaceBook
- musiXmatch

If I use Advanced Task Killer to kill them, they open back up.

Is there a way to stop these from running unless I have them as my active application?

Advertisements
androidmonkey is offline  
Reply With Quote
sponsored links
Old December 3rd, 2011, 08:28 PM   #2 (permalink)
The Doctor
 
chanchan05's Avatar
 
Join Date: Jun 2011
Gender: Male
Posts: 11,428
 
Device(s): Note 3 LTE (N7105), Samsung Galaxy Tab 7.0 Plus (P6200), Samsung Galaxy SL (I9003), , Samsung Galaxy
Carrier: Globe Philippines

Thanks: 174
Thanked 2,532 Times in 2,094 Posts
Default

Facebook is running because its polling for notifications etc, and the upload service. Its running but not connected to the internet, but its running because the upload service is connected to the system itself. For example, from file manager or from gallery, if you press share on an item, you will see a "share to facebook" option for upload.

I dont use musiXmatch so I dont know why it has a running service

Nor do I know why Getjar is running, but on mine it doesnt affect my internet speed.

The only option you have is to freeze them, but you need to be rooted for that.
__________________
https://shared.com?ref=51950 100GB free storage. WOW.

Worried about your health? Take the True Health Assessment now! Click HERE
chanchan05 is online now  
Reply With Quote
Old December 4th, 2011, 11:05 AM   #3 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jun 2010
Posts: 12
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yea, well, thats the thing. I dont want apps like Facebook running unless I choose for them to be running. Regarding the upload service, that service doesnt need to be opened unless I choose to upload a picture. If it is in fact working the way you say, it doesnt always need to be running to work. The "Share to" option has lots of programs that come up when I use it, Evernote, Flickr, etc, none of those programs are running unless I choose them.

I have root on my phone, freezing them though wont allow me to use them anymore.
androidmonkey is offline  
Reply With Quote
Old December 4th, 2011, 11:09 AM   #4 (permalink)
Moderati ergo sum
 
lunatic59's Avatar
 
Join Date: Jun 2010
Location: Pennsylvania
Posts: 25,112
 
Device(s): Galaxy Note 10.1 (2014), Nexus 4, Galaxy S II, Captivate, Nexus 1, Nook Color, Asus Transformer T-1
Carrier: AT&T

Thanks: 8,446
Thanked 13,416 Times in 7,346 Posts
Default

If you use ATK and they open back up then that means other apps or services are using them for a required process. Killing them, freezing them or removing them will likely make your phone very unstable. It is best to just let them be.

If you haven't read this, you might want to read Why You Don't Need a Task Killer.
__________________
_
If the information is useful, Like the post, if the person was helpful, Thank the member.
RULES: Lest we forget | This part of signature intentionally left blank.
_________________________________________________

No Ivory-Billed Woodpeckers were harmed in the composition of this message.
lunatic59 is online now  
Reply With Quote
The Following User Says Thank You to lunatic59 For This Useful Post:
mdanderson (June 25th, 2012)
Old December 4th, 2011, 11:16 AM   #5 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jun 2010
Posts: 12
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by lunatic59 View Post
If you use ATK and they open back up then that means other apps or services are using them for a required process. Killing them, freezing them or removing them will likely make your phone very unstable. It is best to just let them be.

If you haven't read this, you might want to read Why You Don't Need a Task Killer.
I am not talking about system apps, which can make your phone unstable if killed. I am talking about apps like I posted in the OP. That link you sent, Ive read many, many post about not needing a task killer. While I agree that Android manages memory very well, this doesnt stop a background app from using CPU cycles and/or the internet. Memory isnt slowing my phone down its these apps using my CPU when I am trying to play games or other task.
androidmonkey is offline  
Reply With Quote
Old December 4th, 2011, 03:24 PM   #6 (permalink)
Moderati ergo sum
 
lunatic59's Avatar
 
Join Date: Jun 2010
Location: Pennsylvania
Posts: 25,112
 
Device(s): Galaxy Note 10.1 (2014), Nexus 4, Galaxy S II, Captivate, Nexus 1, Nook Color, Asus Transformer T-1
Carrier: AT&T

Thanks: 8,446
Thanked 13,416 Times in 7,346 Posts
Default

If those processes are running they are running for a reason. It is usually because there is a process they provide that another app is calling. If you kill it, you can cause serious problems. There are many who will testify that trying to get rid of the Facebook will disable other communication features of your phone.
lunatic59 is online now  
Reply With Quote
Old December 4th, 2011, 03:27 PM   #7 (permalink)
New Member
Thread Author (OP)
 
Join Date: Jun 2010
Posts: 12
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by lunatic59 View Post
If those processes are running they are running for a reason. It is usually because there is a process they provide that another app is calling. If you kill it, you can cause serious problems. There are many who will testify that trying to get rid of the Facebook will disable other communication features of your phone.
Seriously, think about it. Whats the difference between keeping it from running unless I have it open and not having it at all? So uninstalling FB would disable other communication features on my phone, no.

Ive read numerous threads regarding this subject, many explain about memory management of Android. My point isnt about memory management, its about the CPU being used in the background.
androidmonkey is offline  
Last edited by androidmonkey; December 4th, 2011 at 03:31 PM.
Reply With Quote
Old December 4th, 2011, 03:48 PM   #8 (permalink)
Moderati ergo sum
 
lunatic59's Avatar
 
Join Date: Jun 2010
Location: Pennsylvania
Posts: 25,112
 
Device(s): Galaxy Note 10.1 (2014), Nexus 4, Galaxy S II, Captivate, Nexus 1, Nook Color, Asus Transformer T-1
Carrier: AT&T

Thanks: 8,446
Thanked 13,416 Times in 7,346 Posts
Default

Quote:
Originally Posted by androidmonkey View Post
So uninstalling FB would disable other communication features on my phone, no..
Actually, yes.

I am going to ask some of our rom developers if they can explain it better.
lunatic59 is online now  
Reply With Quote
Old December 4th, 2011, 04:20 PM   #9 (permalink)
not really so scary
 
scary alien's Avatar
 
Join Date: Mar 2010
Location: Indy
Posts: 17,450
 
Device(s): LG Nexus 5, Samsung Galaxy Nexus, Asus Nexus 7, Moto Droid X, HTC Droid Eris
Carrier: T-Mobile

Thanks: 33,000
Thanked 15,011 Times in 7,370 Posts
Default

Since I don't and haven't used any of the apps that the OP has listed, I can only tell you my experiences from having actually written an app that utilizes a background service.

When such an app (let's call it a service-app) is killed, it is automatically restarted by Android.

The app itself must recognize that it crashed and/or was killed in order to differentiate that it was started-up from boot or normally by the user. If it was killed, it will likely spend time trying to re-sync and re-establish itself back to the state it was prior to be terminate. So, killing the app manually or with a task killer will almost certainly cause extra CPU cycles and other resources to be used versus just leaving the app running.

The best alternative would be, assuming that the app supports this, would be to simply turn off its syncing feature and then initiate a sync manually, at the time of your choosing.

If your app does not support turning off its syncing feature, your only other choice would be to uninstall it if it not a system app, or obtain root capability and uninstall or freeze it.

Hope that helps.

Cheers!
scary alien is online now  
Last edited by scary alien; December 4th, 2011 at 04:24 PM. Reason: spelling ;)
Reply With Quote
The Following 3 Users Say Thank You to scary alien For This Useful Post:
alostpacket (December 4th, 2011), lunatic59 (December 4th, 2011), mdanderson (June 25th, 2012)
Old December 4th, 2011, 04:22 PM   #10 (permalink)
Senior Member
 
Join Date: Aug 2010
Location: PA
Gender: Male
Posts: 5,569
 
Device(s): Rooted Samsung Galaxy Nexus, Rooted HTC Incredible, Stock 4G Motorola Droid Xyboard 10.1 (32GB)
Carrier: Verizon

Thanks: 477
Thanked 1,982 Times in 1,340 Posts
Default

The apps are cached in the background, not running, therefore they are not using cpu cycles or data. You can also turn off background data.

If they are running in the background, it means they are trying to accomplish a task such as syncing or another app has called on it for one of it's services such as contact/photo/music syncing.
sdrawkcab25 is offline  
Last edited by sdrawkcab25; December 4th, 2011 at 04:25 PM.
Reply With Quote
The Following User Says Thank You to sdrawkcab25 For This Useful Post:
lunatic59 (December 4th, 2011)
sponsored links
Old December 4th, 2011, 04:37 PM   #11 (permalink)
Senior Member
 
Scur's Avatar
 
Join Date: May 2011
Location: Illinois
Gender: Male
Posts: 1,394
 
Device(s):
Carrier: Not Provided

Thanks: 353
Thanked 490 Times in 309 Posts
Send a message via MSN to Scur
Default

Those apps reside in memory, but only use your CPU when performing a task. You can use a task killer all day long, but more will pop open, mostly the same ones. They're sitting in your memory waiting to perform a task, and for the most part aren't using up your CPU. Android likes to have stuff in it's memory, it sees too much empty memory as a waste of space. If you install SystemPanel App or something like it that will keep a history of how much CPU each app is really using.
Scur is offline  
Reply With Quote
The Following User Says Thank You to Scur For This Useful Post:
lunatic59 (December 4th, 2011)
Old December 4th, 2011, 05:11 PM   #12 (permalink)
AF Contributor
 
Mr. Lucky's Avatar
 
Join Date: Oct 2011
Location: SoCal
Posts: 1,596
 
Device(s): Nexus 5 (rooted), Galaxy Tab 10.1 (rooted), Nexus 7 (stock)
Carrier: Not Provided

Thanks: 74
Thanked 229 Times in 184 Posts
Default

To the OP: Since you have root on your phone, try the Permissions Denied app. Once you grant it su access, it will bring up a list of your installed apps. Press on the ones in question, and I think you will find that they all have RECEIVE_BOOT_COMPLETED permission. Remove that permission and reboot. If the app isn't notified when you start your phone, I'm pretty sure its background services won't start until you actually run the app in question.
Mr. Lucky is offline  
Reply With Quote
The Following 2 Users Say Thank You to Mr. Lucky For This Useful Post:
alostpacket (December 4th, 2011), lunatic59 (December 4th, 2011)
Old December 4th, 2011, 05:40 PM   #13 (permalink)
Over Macho Grande?
 
alostpacket's Avatar
 
Join Date: Nov 2009
Location: NY
Posts: 7,920
 
Device(s): GlassXE, MotoX, N5, N4, N7'12, GNex, N1, SGT10.1, Revue, Xoom, Eris, OG Droid
Carrier: TMO

Thanks: 4,603
Thanked 3,578 Times in 1,530 Posts
Default

Quote:
Originally Posted by Mr. Lucky View Post
To the OP: Since you have root on your phone, try the Permissions Denied app. Once you grant it su access, it will bring up a list of your installed apps. Press on the ones in question, and I think you will find that they all have RECEIVE_BOOT_COMPLETED permission. Remove that permission and reboot. If the app isn't notified when you start your phone, I'm pretty sure its background services won't start until you actually run the app in question.

This could cause other, different problems but might be worth a try.

The thing is the OS may still attempt to send the BOOT_COMPLETED intent, but these apps will crash when they get it.

They can also ask the system to be started "every 10 mins" or similar. So while they may be off for the first ten mins after boot, they will still launch.


Also there's a lot of green in this here thread!
alostpacket is offline  
Reply With Quote
Old December 4th, 2011, 05:54 PM   #14 (permalink)
Senior Member
 
zuben el genub's Avatar
 
Join Date: Jan 2011
Posts: 5,151
 
Device(s): Oppo Find 7 Nexus 4, Nexus S
Carrier: Not Provided

Thanks: 62
Thanked 971 Times in 776 Posts
Default

Quote:
Originally Posted by lunatic59 View Post
If those processes are running they are running for a reason. It is usually because there is a process they provide that another app is calling. If you kill it, you can cause serious problems. There are many who will testify that trying to get rid of the Facebook will disable other communication features of your phone.
I've deleted all social media with no detriment to phone - calls work, wifi works, text works, mms works. the apps I do want work. Basic stuff should work. Other social stuff might not. I'm not interested in social stuff. FB shouldn't work if you never sign up for it. How can it poll if it doesn't have the right info? My account name, GMail name and most of the other stuff are totally different anyway. Half the extras on the phone I never registered for.
zuben el genub is offline  
Reply With Quote
Old December 4th, 2011, 08:07 PM   #15 (permalink)
AF Contributor
 
Mr. Lucky's Avatar
 
Join Date: Oct 2011
Location: SoCal
Posts: 1,596
 
Device(s): Nexus 5 (rooted), Galaxy Tab 10.1 (rooted), Nexus 7 (stock)
Carrier: Not Provided

Thanks: 74
Thanked 229 Times in 184 Posts
Default

Quote:
Originally Posted by alostpacket View Post
This could cause other, different problems but might be worth a try.
That's true, but I've followed this advice and been lucky more often than not. Nothing to lose by trying... other than a little time.
Mr. Lucky is offline  
Reply With Quote
Old December 4th, 2011, 09:28 PM   #16 (permalink)
The Doctor
 
chanchan05's Avatar
 
Join Date: Jun 2011
Gender: Male
Posts: 11,428
 
Device(s): Note 3 LTE (N7105), Samsung Galaxy Tab 7.0 Plus (P6200), Samsung Galaxy SL (I9003), , Samsung Galaxy
Carrier: Globe Philippines

Thanks: 174
Thanked 2,532 Times in 2,094 Posts
Default

Quote:
Originally Posted by zuben el genub View Post
I've deleted all social media with no detriment to phone - calls work, wifi works, text works, mms works. the apps I do want work. Basic stuff should work. Other social stuff might not. I'm not interested in social stuff. FB shouldn't work if you never sign up for it. How can it poll if it doesn't have the right info? My account name, GMail name and most of the other stuff are totally different anyway. Half the extras on the phone I never registered for.

If they are uninstalled, nothing will happen to your phone because whatever service that was triggering them (say Facebook) to run is getting back info that Facebook is not installed.

If it is installed and the service gets back that triggering Facebook to run failed, it will try over and over to run Facebook again until it gets it running. Which is basically why Facebook re-opens every time you kill it.

Short is, if you dont want Facebook running background, uninstall it.
chanchan05 is online now  
Reply With Quote
Old December 5th, 2011, 06:14 AM   #17 (permalink)
Senior Member
 
ardchoille's Avatar
 
Join Date: Mar 2011
Location: Seattle
Gender: Male
Posts: 3,684
 
Device(s):
Carrier: Not Provided

Thanks: 1,957
Thanked 1,959 Times in 856 Posts
Default

If one app is using an activity from another app both apps will appear as "running". Let me explain this a bit..

Activities

Android apps use activites to preform tasks. For example, if you use a file manager to send a picture via email, the file manager calls the send activity within an email app, passes the file name to it and the email app sends the picture.. not the file manager. This will result in seeing the email app as "running" even though the user didn't actually launch that email app.

Smaller apps
Using activites helps developers design smaller apps. A file manager app that contains every bit of code needed to do everything a file manager does would likely be so large that no one would want to install it. Developers know that an android phone more than likely has an email app so there is no need for the developer to include email code in his/her file manager to send a picture when he/she can call an activity in an existing email app to do the job. This results in a smaller file manager app since there is no need to include email code or any other code for an activity that can be done via an app that is already present on the phone. This also alleviates redundant code. When you install an app outside of the android market, also known as sideloading, the file manager app calls the package installer (already present in Android) to install the requested app.

Running apps vs. cached apps
The "Manage Applications" list included in many android devices lists running apps as well as cached apps. Cached apps don't use any CPU or battery, they're cached so they will load faster the next time you need them. Killing cached apps results in those apps requiring more time to load the next time they are launched.

System management
By default, every android application runs in its own Linux process. Android starts the process when any of the applicationís code (activities) needs to be executed, and shuts down the process when itís no longer needed and system resources are required by other applications.

* Android is hard coded to automatically kill a task when more memory is needed.
* Android is hard coded to automatically kill a task when itís done doing what it needs to do.
* Android is hard coded to automatically kill a task when you havenít returned to it in a long time.
* Most services (while possibly running in the background) use very little memory when not actively doing something.
* A content provider is only doing something when there is a notification for it to give. Otherwise it uses very little memory.
* Killing a process when it isnít ready only causes it to have to reload itself and start from scratch when itís needed again.
* Because a task is likely running in the background for a reason, killing it will only cause it to re-spawn as soon as the activity that was using it looks for it again. And it will just have to start over again.
* Killing certain processes can have undesirable side effects. Not receiving text messages, alarms not going off, and force closes just to name a few.
* The only true way to prevent something from running at all on your phone would be to uninstall the .apk.
* Most applications will exit themselves if you get out of it by hitting ďbackĒ until it closes rather than hitting the ďhomeĒ button. But even with hitting home, Android will eventually kill it once itís been in the background for a while.

If you see an app running that you didn't launch, it's most likely because an activity within that app was called by another app to perform a task. If you kill the app you didn't launch, the system has to relaunch that app in order to complete its task. This is why some people kill a task and then see it immediately running again. Constantly killing that app creates a situation where the user is battling the system resulting in wasted system resources.

Android is Linux
Android is not a Windows-based OS, it is based on Linux. Many of the apps you think are running aren't actually running, they're cached, this is typical with a Linux operating system and is much more efficient than other systems. Cached apps don't use any CPU or battery, they're cached and will load faster the next time they're needed.
ardchoille is offline  
Reply With Quote
The Following 4 Users Say Thank You to ardchoille For This Useful Post:
cerj (October 29th, 2012), djboi2011 (January 14th, 2012), lunatic59 (December 5th, 2011), mdanderson (June 25th, 2012)
Old December 5th, 2011, 07:31 AM   #18 (permalink)
Senior Member
 
zuben el genub's Avatar
 
Join Date: Jan 2011
Posts: 5,151
 
Device(s): Oppo Find 7 Nexus 4, Nexus S
Carrier: Not Provided

Thanks: 62
Thanked 971 Times in 776 Posts
Default

I'm rooted, so FB is gone. But it does need to be controlled.

I do have a FB account, but the name is not any I use anywhere else and not my real name. Having FB search even if never registered with it or use it is not fair to those with limited data plans. I'd call this an unacceptable and unfair business practice.

You are also right that FB has tentacles everywhere. I use NoScript with FF and only turn on javascript when necessary. When you click to allow a site, half the time facebook net is in the NoScript list.
zuben el genub is offline  
Reply With Quote
Old October 29th, 2012, 12:17 AM   #19 (permalink)
Member
 
cerj's Avatar
 
Join Date: Sep 2012
Location: San Antonio via NOLA
Gender: Male
Posts: 111
 
Device(s): SGS2 Blu Kuban rom n Kuban Kernel. 32G,class10 sd
Carrier: Not Provided

Thanks: 52
Thanked 24 Times in 20 Posts
Default

Quote:
Originally Posted by ardchoille View Post
If one app is using an activity from another app both apps will appear as "running". Let me explain this a bit..

Activities

Android apps use activites to preform tasks. For example, if you use a file manager to send a picture via email, the file manager calls the send activity within an email app, passes the file name to it and the email app sends the picture.. not the file manager. This will result in seeing the email app as "running" even though the user didn't actually launch that email app.

Smaller apps
Using activites helps developers design smaller apps. A file manager app that contains every bit of code needed to do everything a file manager does would likely be so large that no one would want to install it. Developers know that an android phone more than likely has an email app so there is no need for the developer to include email code in his/her file manager to send a picture when he/she can call an activity in an existing email app to do the job. This results in a smaller file manager app since there is no need to include email code or any other code for an activity that can be done via an app that is already present on the phone. This also alleviates redundant code. When you install an app outside of the android market, also known as sideloading, the file manager app calls the package installer (already present in Android) to install the requested app.

Running apps vs. cached apps
The "Manage Applications" list included in many android devices lists running apps as well as cached apps. Cached apps don't use any CPU or battery, they're cached so they will load faster the next time you need them. Killing cached apps results in those apps requiring more time to load the next time they are launched.

System management
By default, every android application runs in its own Linux process. Android starts the process when any of the applicationís code (activities) needs to be executed, and shuts down the process when itís no longer needed and system resources are required by other applications.

* Android is hard coded to automatically kill a task when more memory is needed.
* Android is hard coded to automatically kill a task when itís done doing what it needs to do.
* Android is hard coded to automatically kill a task when you havenít returned to it in a long time.
* Most services (while possibly running in the background) use very little memory when not actively doing something.
* A content provider is only doing something when there is a notification for it to give. Otherwise it uses very little memory.
* Killing a process when it isnít ready only causes it to have to reload itself and start from scratch when itís needed again.
* Because a task is likely running in the background for a reason, killing it will only cause it to re-spawn as soon as the activity that was using it looks for it again. And it will just have to start over again.
* Killing certain processes can have undesirable side effects. Not receiving text messages, alarms not going off, and force closes just to name a few.
* The only true way to prevent something from running at all on your phone would be to uninstall the .apk.
* Most applications will exit themselves if you get out of it by hitting ďbackĒ until it closes rather than hitting the ďhomeĒ button. But even with hitting home, Android will eventually kill it once itís been in the background for a while.

If you see an app running that you didn't launch, it's most likely because an activity within that app was called by another app to perform a task. If you kill the app you didn't launch, the system has to relaunch that app in order to complete its task. This is why some people kill a task and then see it immediately running again. Constantly killing that app creates a situation where the user is battling the system resulting in wasted system resources.

Android is Linux
Android is not a Windows-based OS, it is based on Linux. Many of the apps you think are running aren't actually running, they're cached, this is typical with a Linux operating system and is much more efficient than other systems. Cached apps don't use any CPU or battery, they're cached and will load faster the next time they're needed.
I have been searching for the same answer,s.none put it as eloquent as you. Thank you for your time. I have been looking at Android thru a dirty Windows 7.
cerj is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Discussion > Android Applications
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:37 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.