We all know that the Android is very permissive, compared with iOS from Apple, with the applications. So, many of them are working in the background, even if you do not want it, draining the battery without any important reason.

Scenario:

Using the Android phone/tablet on "TO GO" where there is no Wi-Fi, and use to access Internet over the mobile network data to access your 'traveling apps': news, weather, maps, etc.

Solution:

Here are few tricks to play with in the Phone Settings:

1. Disable the Wi-Fi (set it on OFF in the Settings screen).
Note: you can enable it when you are on more statically location, and where you can charge the phone (work, office, friends places, etc.)

2. Disable Apps Notifications: Always, when you install a new application go to its "settings / configuration" screen and turn off all "automatic data pulling or pushing" or "notifications".

Here is an example of the "Yahoo Weather" notification app internal setting, which I disable:

﻿

I already have the Weather widget on the screen, so I don't need to see the temperature in the notification bar.

3. Disable Global Notifications: In the "Manage applications" section, disable the "Show notifications" check-box for all applications that you want to keep 'silent'.

Here is an example screenshot:

﻿

﻿

4. Disable App Data Usage: In the "Settings > Data Usage" you can see all the apps that are going over mobile network.

﻿

Select each application from that list (in above example: Flipboard) and go to its "app data usage" screen. At the very bottom of this screen (sometimes is not visible, so you have to scroll-down a little) there is the setting "Restrict background data", which is unchecked. You have to check it.

﻿

Notes:

from all my apps, I let only the "Yahoo Weather" application to work on background, all other (inclusive the Google Play Service) are not allowed to do this, and from 2 hours battery life I got 2 days.

Disable Data Usage setting works only when you are using the 'mobile internet', not over the Wi-Fi. This means that over Wi-Fi all apps can work in background without any settings change. Usually, when we are on Wi-Fi connection, we are located in a place where we can easily charge the phone (work, home, etc.), so there is no problem if all apps are working in background.

Thank you for reading this article, and I hope it will help you to squeeze more juice out of your battery.

Cheers!

PS: if you have any other tricks, don't be shy to let us know, please (that's why we have the bellow comments section) :)

----

Another quick trick:

5. Use the full battery cycles as much as possible:
- charging from 0 -->100% in one go
- usage from 100% --> 0% in one go
no short charging steps in the middle (i.e. from 80 --> 100, 0 --> 40 etc.).

The paper’s author, JPL lead scientist Gerard J. Holzmann, explained that the mass of existing coding guidelines is inconsistent and full of arbitrary rules, rarely allowing for now-essential tasks such as tool-based compliance checks. Existing guidelines, he said, inundate coders with vague rules, causing code quality of even the most critical applications to suffer.

“Most serious software development projects use coding guidelines,” Holzmann wrote. “These guidelines are meant to state what the ground rules are for the software to be written: how it should be structured and which language features should and should not be used. Curiously, there is little consensus on what a good coding standard is.”

Holzmann laid out 10 strict rules for developing software with code safety in mind. The rules were specifically written with the C language in mind (a language NASA recommended for safety-critical code due to its long history and extensive tool support), though the rules can be generalized for coding in any programming language.

1: Restrict all code to very simple control flow constructs. Do not use GOTO statements, setjmp or longjmp constructs, or direct or indirect recursion.2: All loops must have a fixed upper bound. It must be trivially possible for a checking tool to statically prove that a preset upper bound on the number of iterations of a loop cannot be exceeded. If the loop-bound cannot be proven statically, the rule is considered violated.3: Do not use dynamic memory allocation after initialization.4: No function should be longer than what can be printed on a single sheet of paper (in a standard reference format with one line per statement and one line per declaration.) Typically, this means no more than about 60 lines of code per function.5: The assertion density of the code should average a minimum of two assertions per function. Assertions must always be side effect-free and should be defined as Boolean tests.6: Data objects must be declared at the smallest possible level of scope.7: Each calling function must check non-void function return values, and the validity of parameters must be checked inside each function.8: Preprocessor use must be limited to the inclusion of header files and simple macro definitions. Token pasting, variable argument lists (ellipses), and recursive macro calls are not allowed.9: The use of pointers should be restricted. Specifically, no more than one level of dereferencing is allowed. Pointer dereference operations may not be hidden in macro definitions or inside typedef declarations. Function pointers are not permitted.10: All code must be compiled, from the first day of development, with all compiler warnings enabled at the compiler’s most pedantic setting. All code must compile with these setting without any warnings. All code must be checked daily with at least one—but preferably more than one—state-of-the-art static source code analyzer, and should pass the analyses with zero warnings.

Holzmann included detailed rationales for each of these rules in the paper, but the general gist is that together, the rules guarantee a clear and transparent control flow structure to make it easier to build, test and analyze code along broadly accepted but all-around disjointed standards. JPL has developed automated software for deep space missions such as the Mars Curiosity rover and the Voyager probe, and the laboratory is already using the rules on an experimental basis to write mission-critical software.

Holzmann believed that complying with NASA’s rules, strict as they might be, can lessen the burden on developers and lead to better code clarity, analyzability and safety.

“If the rules seem Draconian at first, bear in mind that they are meant to make it possible to check code where very literally your life may depend on its correctness: code that is used to control the airplane that you fly on, the nuclear power plant a few miles from where you live, or the spacecraft that carries astronauts into orbit,” he wrote.

“The rules act like the seat belt in your car: Initially they are perhaps a little uncomfortable, but after a while their use becomes second-nature, and not using them becomes unimaginable.”

Applying NASA’s coding standards to JavaScript
NASA JPL’s rules for developing safety-critical code are broad enough to generalize to writing code in any programming language, but one developer has already connected the dots to the most popular Web development language out there: JavaScript.
.... .... ....

Followers

Subscribe To

Recently Friend Visits:

ADs:

New York Car Service and New York Limo Service provided by NYCairportsLimo.com from Manhattan to Upstate New York, Westchester, Long Island, Nassau, Suffolk, New Jersey, Pennsylvania and Connecticut. NYC Airports Limo use limos and luxury cars for Car Service New York from Manhattan to John F. Kennedy, LaGuardia, EWR, Philadelphia and Long Island MacArthur Airport. NYCairportsLimo is specializing in Airport Car Service from Brooklyn, Queens, Bronx and Staten Island to JFK, LGA, EWR, HPN, ISP and PHL Airports.