How to prevent the rush of apps when connectivity or power state change - General Questions and Answers

Hi,
I have noticed that my phone will be non-responsive when network state change (like connecting to a new WiFi) or when it just wakes up. It appears to be caused by too many apps starting. ES file manager showed the list of applications. At least half of them do not need to be waken up.
Is there any way to manage this? My guess is that there is some system event these apps subscribe to. If I can prevent them from receiving such event, then it will reduce the rush. It appears 3C toolbox can do that but it would require root. Any other options?
Thanks

Related

TaskPanel, Autostarts, and when to use a task killer

Please dont 'quote' this as it VERY lengthy, just copy and paste the this first sentence.
I wanted to write up a definitive posting on task killers as I think they are way to often misused and misunderstood and I am getting quite tired of reposting this same information.
I use a task killer called TaskPanel XTRA (its free). BUT, I ONLY use it for killing tasks that are misbehaving (an app that has slowed down or nearly hung your phone or an app that is CLEARLY causing battery drain or sending copious data via your cellular connection). If an app continues to misbehave, switch to a different app that offers the same functionality, do NOT continue to use a task manager / task killer to kill an app continuously.
Task killers should NEVER be configured to automatically kill an app (as I will explain later in the post) and should NEVER be used to manually kill apps UNLESS it is a small emergency (as in major battery drain, copious cellular data, massive processor usage/memory usage preventing the user from using the phone normally).
Android is a VERY powerful operating system which gives YOU THE USER the control to manage your phone (hence the major reason I dont like the IPhone or Windows Phone), but with that control comes responsibility. As I will explain shortly, Android has many built-in features in place to help you manage your phone's precious memory. While there has been much nonsense one way or the other as to whether task killers should be used for anything other than a misbehaving app, I tend to listen to the creators of a product before I listen to some jackass who bases a decision on pure speculation or a 'feeling' he has. I can tell you that I have not used Task Panel in the last 4 months (with the exception of I believe Pandora which I used about a month ago and could not find a way to actually exit the app - guess what...this app is no longer on my phone - both because of privacy concerns that recently came up about Pandora AND I dont keep apps around that I cant manually exit the app cleanly).
For a VERY good write up (with a brief 'readers digest' summary at the bottom with plain English bullet points, since most of the article is taken directly from the Android developer FAQ and is very techy for non-programmers), have a gander thru this.
http://geekfor.me/faq/you-shouldnt-b...-with-android/
And for the FAQ they quote most of the above article from (but I do recommend you read the above FIRST as it will give you some context - much of the reasons are 'cherry picked' from different areas of the FAQ to help you understand why this is important and give you the information that is relevant to the discussion as to why task killers are not a good thing). All of the relevant information is in the page that will load up (in the rightmost panel / frame) so you dont need to click any links to read the relevant article. I am only providing this link as a reference to the original source material so you dont think I am just making this up - this is straight from the horses mouth so to speak (again, for most people, dont read this FAQ, read the one above first to get context and then if you feel you want to know more, read this link below).
http://developer.android.com/guide/t...damentals.html
Alright, enough about task killers, now to deal with how to manage those pesky apps that seem to always be running (even if you never started them) and how to keep them from starting up using a method that will NOT affect Android and how it manages your memory but will keep your phone in peek performance.
For managing the conditions when an app starts up, use an app called Autostarts, do NOT use a task killer to 'auto kill' tasks. Autostarts literally allows you to control the conditions of when an app starts.
Android has built in functionality for managing the memory footprint of various apps and will manage your phones memory quite nicely. Much of the functionality of the built in memory management came in Android 2.2 (also sometimes referred to as Froyo) and is really quite good 'if' you allow the phone to manage processes rather than just quickly killing everything.
There is a reason you can no longer just 'kill' system level processes, Google wants you to allow Android to 'learn' how to manage itself.
Android has a very powerful feature, the ability for app writers to start their app when certain conditions occur. The problem with this powerful feature is, often times, apps are bloated or poorly written, many times being started for any little thing your phone does (wifi on or off, Bluetooth on or off, location changes, screen on or off, USB connected, cellular connection, headphones connected, a cow fart, a bird poops, etc.). Even Google itself has been guilty of this, Google Maps (until recently) would be started in nearly 20 different conditions as a background process for very trivial things and was a major source of battery drain (it still is to some extent). This is where Autostarts comes in. Use Autostarts to control the conditions of when/if an app will start up automatically based on a certain condition.
Most ancillary apps (apps that are not integral to the core functioning of the phone - although it is probably more appropriate to refer to these as 'user apps', it isnt quite accurate because many 'system apps' (which in the technical description are apps that are installed with the rom) are not core apps either. For example, many roms come with Youtube pre-installed (meaning you do not manually have to go to the market and install them) which is not integral to the core functioning of the phone), these apps do NOT need to ever start under ANY condition for that app to function normally. The only considerations for an app starting itself would be the widget updating, the app has a scheduled event (for example, an alarm, a podcast client downloading podcasts at a certain time of day, Titanium backup performing a scheduled backup, etc.), or an app that has to be running in the background to perform a task when certain conditions arrive (for example, an app called Sanity needs to be available to run and monitor for incoming/outgoing phone calls so that it can start itself and perform its function during a phone call).
Using Autostarts, I have disabled nearly 80% of EVERY condition that all NON-system apps start under (I havent counted but for 70 apps, this is probably 55 apps or so that I disabled EVERYTHING these apps would start under). This includes Google Maps (yep, even Google is guilty of having an app needlessly running when it doesnt need to).
By taking control of your apps (in essence, disabling as many apps from 'auto starting' until YOU the user launch the app manually) and properly quitting an app when you can (within the app, find a way to click a 'quit' or 'exit' button to allow the app to remove itself from memory) rather than just allowing apps you launch to run in the background, you can save yourself massive amounts of battery life, limit cellular data usage, AND allow Android to properly manage itself.
Think of it like this, if I were trying to learn something but you (the user) kept doing it for me, Id never learn. And if you read the above linked article, you will begin to understand why there is more to this than just allowing Android to learn.
To give you an idea, using Autostarts to disable any non-system app that does not need to be running, if I am using the stock battery, I can run my phone for 2 days pretty easily if I simply turn off cellular data, Wifi and Bluetooth when I dont need it, maybe even stretch it to 3 days.
My ram usage is almost always around 50% (150 MB free) on a fresh reboot (around 2 minutes to allow the phone to stabilize) and it remains this way during the day because I exit apps when I am done using them, even tho I have around 80 apps installed, and I dont allow apps to just start themselves because they sensed a fart in my general direction.
For those of you that use a Windows PC, you can think of Autostarts as a proper 'msconfig'. Keeping your PC clean of apps when windows starts keeps your PC running much more smoothly. Autostarts takes this to the next level and keeps apps from ever starting in the first place rather than a task killer 'auto killing' a task, the app restarting, the app getting 'auto killed' again by the task killer, the app again restarting, etc. (a vicious cycle that both kills your battery because the phone has to crank up the cycles on the processor to both start and stop the app, the power used to write and clear the data written to both ram and 'perma' storage (if an app needs to store any data), and cellular data (if an app 'phones home' so to speak when it initially launches (which is both a cause for additional battery usage to send data and also adds to the amount of data your phone transmits over the cellular network, which is a problem given most cell plans have a monthly data cap).
Autostarts is fairly easy to use but does require root.
The app is $2 and here is a brief synopsis of how to use it:
When you initially launch the app, read any dialog messages that appear and click ok thru them. Then, wait for the app to finish loading (there is a progress bar at the top that will fill with yellow - on my phone it takes about 45 seconds to a minute to finish loading in).
Once it is loaded, you need to configure a few things BUT, you might want to just scroll thru the list of things currently on the screen. These are the 150+ conditions that apps currently installed on your phone are starting up under (dont click anything just yet, just browse the list if you are curious).
Right now, the app is configured to show a list categorized by conditions. This unfortunately is not very helpful. We need to change it to sort this list by apps rather than by conditions (so that we can literally disable EVERYTHING an app will automatically start under rather than scrolling thru every condition).
So, hit your menu button and the top left most icon in the menu that appears is an icon 'Group by application'. Hit that icon and magically, you are now seeing every app. You can now click an app and see all the conditions every app starts under. Neat.
But there is one more setting to change first in order to help keep you from doing something you should not.
(Optional but HIGHLY recommended!) Hit your menu button again (if you exited out of the menu already) and hit the upper right most icon, the 'View' button. Tick the topmost checkbox, 'Hide system apps' and hit the 'Ok' button. This will keep you from disabling anything that 'may' be critical to your phone operating.
Now, exit the menu (the 'back' button on the phone itself).
If you decided not to hide system apps, these will appear in YELLOW. It is probably not a good idea to mess with these unless you know what you are doing. Messing with these can cause a soft brick or make your phone unusable in certain conditions (for example, if you prevent the phone.apk app from ever starting, you will never be able to take phone calls).
Now, start scrolling thru the list (start at the top). If it is an app that does NOT need to run in the background, expand the app by selecting it and starting with the topmost condition that app starts under, tap each condition and in the menu that appears, select 'Disable'. Do this for ALL conditions for each app you want to manage. When you are done disabling the conditions, go to the next app and decide again whether that app needs to run in the background or not.
As a brief summary, to consider whether an app should be allowed to run in the background, ask yourself the following:
Does the app:
a. ...have a widget that you are actually using on your home screen that needs to update? For example, a media player or weather widget should NOT be disabled...
b. ...have a scheduled event such as checking the weather, downloading new podcasts, checking email, etc?
c. ...need to perform a certain task or provide some extra function(s) when a specific event happens (such as recording a phone call when it comes in, an eq when audio is playing, etc.)?
My recommendation is, if you answered YES to any of the above questions, leave all the conditions that app starts under alone (unless you know what you are doing, its best not to mess with it as I will explain in a moment).
If you answered NO to all the above, DISABLE ALL of the conditions that app starts under (again, DONT mess with system (yellow) apps and certainly dont disable every condition for these).
I recommend an all or nothing approach for each app is because if an app doesnt behave properly, it can become a major pain to continue to open Autostarts and try to track down a specific condition you disabled that is stopping / preventing that app from functioning the way you want it to.
Every time you update or install an app, if you remember, try to open autostarts and review the conditions the app starts under. Updated apps often times will add something new and if you have this app completely disabled, it may find a way to start itself again.
And, dont worry, you cant permanently screw anything up (unless you are messing with system apps - get the reason why I recommend not playing with system apps?). If an app stops functioning correctly, just re-enable the conditions that app starts under. Pretty easy.
Hopefully, this is complete enough, I will now just link to this post everytime I need to mention autostarts. I am getting quite tired of posting this same information .
Good information for people. Well done.
Sent from me to you using stuff

An Idea: Grouping/Reversing permissions (Wakelock / Connectivity / Positionning)

TL;DR: Go down to summary to just grab the idea
I've been working a lot on optimizing my battery life, and I've become more aware about security concerns regarding Permissions, and I came up with an Idea that would make all of this a lot easier, even for unexperienced users.
Instead of giving apps general permission for wakelock, positionning or connectivity, there should be groups for these permissions. Let me explain with an example:
Say there is a permission group called "Instant Messenger connectivity" for apps like skype, facebook messanger, ICQ and such. you are able to set the update intervall for this group, there are 2 settings: phone in deep sleep and phone awake. The default deep sleep intervall would be like 1 or 2 minutes, the awake setting would be constant. Now every time the intervall runs through, the phone calls a hook that allows all apps in the group to check for new messages. If you want to optimize your battery life or bandwith useage and dont need to instantly know who is sending you a message you set the update intervall to, say 5 or even 15 minutes.
"E-Mail" group would be set to 15 minutes or an hour or 5 hours, whenever you want your not so urgent messages to be delivered. Or set it to "screen activated" so emails get checked when you actually look at your device.
"Updates" group would be allowed to check once a day.
Similar grouping would be done for GPS: One group would be "Navigation software" that would be constantly allowed to track your position, another group could be called "Check-Ins" or "Geographic postings" or something, those apps would only be allowed GPS access after a prompt. Permission through the promt lasts for 5 minutes or so during which the app can get your position, even several times if needed.
This way your navigation software works flawlessly, and you would be able to tag your photos or add locations to your posts or use check-ins but apps couldnt track or log your positions without you knowing it.
Similar thing for waking the phone: "alarms" group is able to wake your phone at any time to ring the alarm. "Maintainance" group would be triggered once every three hours or so.
Timing options would be something like: Always, every X seconds/minutes/hours, while screen is on.
The permission intervall should have a limited duration, which expires either after all the hooks are completed or after a fixed amount of time, stopping apps from gaining GPS permission to tag a post and afterwards keeping the permission to log your movement patterns, or keeping the internet connection alive while trying to get an info from a server that is not currently online or reachable.
Advantages
This would lead to a centralized settings, where you can - if you choose to - set how often you want updates or permissions granted for each group.
Instead of each app waking up the phone individually for their task, all the apps would get a signal to update at the same time, getting the best use out of the time the phone is not on deep sleep.
Permissions would be more transparent to unexperienced users, and it would be either very obvious if apps want permissions they shouldnt have, or they dont get tempted to go overboard with the use of the permissions they are granted.
Summary
- Apps are given permissions in matching groups allowing them permission to use the functions as the user sees fit
- Permissions work as hooks: Instead of letting the app decide when to trigger a certain event, i.e. connect to the internet or wake the phone, the phone decides when the permission should be activated and sends a command to the app which in return then does what it needs to do with the permission (check for messages, get your location etc.)
Disclaimer
This is more of a general demonstration of a principle, my coding knowledge or knowledge of procedures in android is not enough to describe the actual implementation.
I am also not sure at which level this would have to be implemented, i.e. if it could be done within a custom rom or it had to be implemented in the android kernel. I am well aware that it would probably require some recoding from the app developers, and this is not a simple tweak but a pretty big overhaul of the way android works. I just wanted to get the idea out there, just to get you guys thinking or giving you adifferent perspective on things.
Tell me what you think.

Seven common Android problems and how to fix them

1.Battery drain
Numerous users have reported problems with the battery life of their devices. One of the easiest ways to prolong your smartphone's battery is to change your locations and brightness settings.Enter the settings menu, click on Location, and select battery saving mode. As for brightness, you should avoid using auto-brightness and instead turn your screen down somewhere below halfway, or to a level that is acceptable for your eyes.
2.Frozen and slow user interface
Phones typically begin to slow down as their internal storage fills up. Try deleting unused apps and photos, or moving them to the cloud or a microSD card. In addition, you should close open apps that you are no longer using, delete app cache, and limit the use of live wallpapers.An app's cached data can be deleted be going to Settings, clicking on Apps, selecting a certain app, and choosing the "Clear cache" option. Programs such as App Cache Cleaner and Clean Master, both of which are available for free from the Google Play store, can also be used to automate the process of clearing cache.
3.Connectivity issues
If you have are having a problem connecting to Bluetooth, Wi-Fi, or your cellular network, enable Airplane mode for 30 seconds, toggle it off, and try connecting again. Sometimes simply toggling the specific connection can also solve the problem.Still having issues? Try repairing or setting up your Bluetooth device or Wi-Fi network again.
4.Stalled text messages
Ensure you are connected to the Internet either through Wi-Fi or cellular, click on the unsent message, and click the "resend" option.If the problem continues, try restarting your device or even installing a third-party messaging app.
5.Syncing error
There are numerous steps you can take to address problems with syncing. First, ensure that you are connected to the Internet, and that the service you are trying to sync with, such as Google or Dropbox, isn't down. Double check that your password is correct and try syncing again.
6.App crashes
Apps can crash for all sorts of reasons. Is there an update available for either the app or your phone? If so, install it.If not, force close the app by swiping it away in the multitask menu (pictured above) and then reopen it.
7.Unresponsive screen
You may want to throw your phone against the wall when it begins to malfunction, but there isn't a need to panic. Most problems are fixed with a simple restart. Although if you physically damaged your phone or dropped it in water, you may have bigger problems on your hands.Press the power button and let the phone turn off, but wait a minute or two before powering it back on.
Hope these advice can help you,thank you!

Sync (data?) OFF when screen is off

* Often when I work the mobile is at my desk but I still comunicate by sending SMS and using Whatsapp in my webbrowser. Works fine with Samsung and Huawei but with my new Mi10 Ultra id does not work. Connection is lost and I have to tuch some key on the phone to light up the screen and then it syncronizes.
I have set permissions for the apps to allow both autostart and not affected by the battery saver in the system.
I have also set the "data usage" for the apps to allow background data.
...but still, background data for SMS and whatsapp IS deactivated until I light up the screen.
Has anyone run into this problem? Is there any general (mayor) switch for this that I have missed?
This happens to me with Gmail. Sometimes they come in on the lockscreen and sometimes I have to turn the phone on for them to appear. I still have this problem on my Samsung S20 Ultra but I learned to live with it since I never figured out what the problem was. I have no such problems with my SMS or WhatsApp though. Everything else for me seems to be coming through.
tusenkonstnar said:
* Often when I work the mobile is at my desk but I still comunicate by sending SMS and using Whatsapp in my webbrowser. Works fine with Samsung and Huawei but with my new Mi10 Ultra id does not work. Connection is lost and I have to tuch some key on the phone to light up the screen and then it syncronizes.
I have set permissions for the apps to allow both autostart and not affected by the battery saver in the system.
I have also set the "data usage" for the apps to allow background data.
...but still, background data for SMS and whatsapp IS deactivated until I light up the screen.
Has anyone run into this problem? Is there any general (mayor) switch for this that I have missed?
Click to expand...
Click to collapse
Hi there. I pretty much have the same problem with this phone. If it's not permissions nor background data, it's the power saving feature, which is the most aggressive I've seen yet.
I was talking with someone about this in another thread, but I was instructed to turn off battery saver. It got better for a day, but it kind of returned back the way it was. I think you could try and play around with the power saving settings for the apps you want immediate notifications from, which I haven't had time to do. Please let me know how it goes for you and I'll find time to play with it this weekend.

Question How to prevent apps from auto starting at boot

Hello,
All is in the topic, I've got an app that starts automatically when my phone is powered on.
It is Aircall, an app I use for passing and receiving calls at work.
I would like this app not to start automatically each time I power on the phone.
Is there a setting for disabling some apps to autostart ? Or an app you can advise ?
Thanks for your help.
Check the app's preferences to see if there are options.
In the Android settings, go to Apps > See All > (your app. eg Air Call) > App battery usage and set it to 'restricted.' This will greatly restrict an app's ability to do many things in the background.
Other than that, you'd have to root your device to get any more control over the app using something like Servicely (Google Play Store), My Android Tools (apkmirror.com), Permission Manager X (fdroid), AppOppsX (fdroid), or Blocker (fdroid) to control the app's broadcast receivers. Apps can choose to respond to various phone states such as when a boot is completed, when network connectivity changes, power is connected/disconnected, etc. It can take some aggressive action to fully prevent an app from always running.
If you're just annoyed by a notification icon in your notification area you can always disable that app's notification so it doesn't appear.
I have tried all of these things to control apps but if apps use a lot of various broadcast receivers they will find ways to keep running. You may find stopping it to have unintended consequences. It being a work app, I'd consider simply disabling the app's notificaiton if it has a persistent notifcation or something. The next step would be to restrict the app as in 2. The most aggressive thing is to root and tinker with its broadcast receivers.
Hello jawz101,
Thank you very much for this very complete answer.
All your precise instructions are very interesting.
I'll have a look at all these solutions.
Thanks again.
I am not sure about straight forward solution. But I would like to use Greenify app. Add apps to it once and run it once everytime you restart your phone.

Categories

Resources