Saturday, August 14, 2010

BatteryFu Android Application


BatteryFu is an Android application I wrote to save battery life (and data) on my HTC Dream (G1). After trying JuiceDefender from the market, I was quite disappointed at how bloated it was and how it actually ended up using memory and battery on my device which went against what it's supposed to accomplish.

So I wrote BatteryFu as a proof-of-concept to see if a lean and mean battery saver would work. And boy, does it work! I can get almost 4 days of battery life under normal usage (using conservative settings).

UPDATE: BatteryFu is now open source. Get the source at:

  • Very lean app: It uses no memory or background services (unless you use the "Data while screen on" feature). This is important for my HTC Dream as I am running Froyo and it needs every byte of RAM it can get.
  • Night mode: This disables activating sync while you are asleep, hence extending your battery life even more and preventing e-mails from disturbing you at night. Also saves you data on your data plan. You can configure the night mode start and end time (by default it is 10pm to 6am).
  • Data when screen unlocked: allows you to continue to use your phone as normal by enabling data then you unlock the screen, although this will adversely affect battery life. Warning: task killers can stop this feature working.
  • Data while charging: allows you to plug in your phone to a charger and receive updates, tether, etc.
  • New modes: Travel mode, Offline mode, Online mode, etc.
  • Widget: a home screen widget that allows you to toggle BatteryFu by clicking the icon, or open the settings screen by clicking the text.
  • Very handy notification icon that allows you to toggle BatteryFu modes even while within another app.
  • APNdroid support for toggling mobile data. This is recommended for CDMA users on pre-gingerbread devices, or any users having an issue with mobile data toggling.
Installation and usage

Search the app market for "BatteryFu" to install it (or scan the QR code above). Do not install or move app to SD, as this may cause problems. Once installed, you will need to configure it (although default configuration is OK). Make sure that you leave the Android mobile data setting enabled (Settings > Wireless & Networks > Mobile Networks > Data enabled), otherwise BatteryFu will not be able to establish a mobile data connection.

Set the Sleep time (which is the time period it uses for activating your sync connection, i.e. check for e-mail every XXX mins/hours). I highly recommend using 30mins or more. Anything less and you might actually have more battery drain than usual. This may seem counter-intuitive, but consider that when not running BatteryFu the phone does not need to constantly initiate an auto-sync connection and re-sync all your content (unless you have poor cellphone reception).

Also set the Connect time which is the amount of time it keeps the data connection open during sync, before closing the connection again. Note that connect time does not affect sleep time, so if you use 15 min sleep time with 5 minute connect time (not recommended!) then your data connection will actually be on for 20 mins per hour.

You can also enable Night mode and set the start and end times. BatteryFu will not activate the data connections during night mode.

After you close the BatteryFu screen, if it has been enabled, it will close the configured data connections (mobile and/or Wifi), and then wait out the "sleep time" before re-enabling them. It then starts sync and waits for the "connect time", after which it disables the data connection(s) again.

If you would like to donate (any amount), you can do so using PayPal:

  • Argh! My 3G settings are messed up! Please fix!
Yes, this is how BatteryFu works. It disables your 3G/GPRS APN by renaming the "APN Type" field to "batteryfu_disabled". It will revert the APN Type when connecting for data. Please disable BatteryFu before uninstalling it, as Android does not provide a way for the application to clean up after itself. If you uninstalled it without disabling it first, you can re-install it, disable it, then uninstall it again, or else edit Settings > Wireless & networks > Mobile networks > AccessPoint Names. Go through each APN and change APN Type to "default,supl" (or "Internet" if it is a selection list) instead of "batteryfu_disabled". Alternatively, when in the APN list, press menu button and select "Reset to default".
  • When I start BatteryFu, I get an "APN Error" message saying something about APN's and CDMA I don't understand. I never got this before! Please fix! 
The error message is the result of an APN test that was added to BatteryFu v1.20, which attempts to detect phone settings that are incompatible with BatteryFu (which could also be something trivial like another app that has disabled your APN before BatteryFu was started). Previously, BatteryFu would look like it was working, but it wouldn't save you any battery because it was unable to disable your mobile data connection. This resulted in a lot of negative comments on my app. Now it lets you know that it won't work (which also means that it never actually worked before).

What can you do to fix this? My recommended way to get around the problem, is to install the APNdroid application from the market, and then tick the option to use APNdroid in BatteryFu (Mobile data options > Use APNdroid app).

Alternatively, if you understand the process, you can do this manually: If your phone has only one APN, and it's APN Type is set to "Internet + MMS" (or "default,supl,mms" or just "mms"), then BatteryFu will not disable it, since it is needed for MMS. In this case, change the type to "Internet" (or "default,supl"), then make a copy of the APN and set the copy to "MMS" so that you can still receive MMS. BatteryFu should now work (in theory, I have not been able to test this - please let me know if it works for you).
  • What if I want to surf the web? If I manually activate my wifi/3g won't BatteryFu close it?
Yes it will, when it begins it's next sleep cycle. So please disable BatteryFu (by using the toggle widget for example) when you want to use the web (or use the Data while screen on feature). When disabled, BatteryFu will automatically enable your data connections before exiting. You can then re-enable BatteryFu when you are done to get back into power saving mode.
  • Can you show some indication of how much battery was saved?
No this it actually impossible, because what would it compare the amount of battery saved to? Compared to a phone not running any software? Compared to the phone when it gets 10 calls at 2 mins per call, plus a weather widget updating every 15 mins? Instead, I will try to give an indication of expected battery life based on current usage, in a future version (e.g. you have 3 days and 2 hours of battery life left).
  • Hey, this thing isn't saving me any battery! Does it work?
Yes, it most certainly works, however constant use of your phone will obviously out-weigh the battery saving, i.e. it will not save you battery if you are a heavy user of the phone. If you use a battery widget that displays percentage battery remaining, you will see that while the phone is not in use (with BatteryFu enabled), battery use is minimal. So BatteryFu saves you battery while the phone is asleep.

If you get an APN error message when starting BatteryFu, then BatteryFu is incompatible with your network settings and is thus unable to disable your mobile data connection. In this case, you will see little-to-no battery saving. See the related FAQ on what you can do to fix this.

Moving BatteryFu (and other constant-use apps) to SD card can also cause extra battery drain, as the SD card must be switched on constantly. Keep BatteryFu in the internal memory.
  • Data while screen on isn't working (or only works sometimes), why?
You probably have a task killer (or your phone is low on memory) so the service is getting killed. This will stop the feature from working. You will need to open BatteryFu and close it again to get it to restart the service. If you don't have a lock screen, you will need to untick the "Wait till screen unlocked" option.

It is not recommended that you use this feature - rather use the widget or notification icon to toggle BatteryFu as-and-when you need to use the internet. You will see more battery saving this way.
  • What is this "DNS fix" and why does it require root?
The DNS fix is an experimental feature that is an attempt to fix Android bug #2207: 3G reconnection issue. See similar bug reports for APNDroid. It requires root access to your phone because it needs to set some system properties that are not possible to set otherwise. Note that if you are on Android 2.3.X or above, you will not need this feature and it will be disabled.

You must have a rooted phone to enable this feature. You should get a prompt asking for root access to the script after configuring BatteryFu. Please grant BatteryFu access and tick the "remember" checkbox, otherwise the prompt will popup during a sync and the phone screen might be off at the time.

For those without a rooted phone, I have found a work-around for Android 2.2: disable BatteryFu, toggle mobile data off and on (the data should then connect after a few seconds), then re-enable BatteryFu.
  • Why doesn't BatteryFu work reliably across all phones and networks?
The biggest problem for BatteryFu is that Android does not provide a method to switch off mobile data (this was finally added in Android 2.3.X so BatteryFu should work reliably on those devices). This means that it needs to resort to back-door methods, which in this case is to disable your internet APN (in a similar way to how APNDroid does it). This method works for some GSM network configurations, but not others (and reportedly not for CDMA), and is also prone to an Android bug (see DNS fix workaround).

I have added the option to use APNdroid to switch mobile data as it has alternative ways to switch data that will work for more networks and devices. If mobile toggling is not working on your phone, please try installing APNdroid. BatteryFu will then automatically use it.
  • What is the optimal configuration for BatteryFu?
There isn't an optimal configuration that suits everyone. I recommend the following for outstanding battery life for the average user though: enable toggling of mobile data, enable toggling of wifi, 1 hour sleep time, 3 minute connect time, disable "data while screen on", enable "night mode" from 10pm to 6am, and I also recommend setting your phone to use only 2G networks for additional battery saving. With moderate use and these settings, you should only need to charge your phone every 2 or 3 days.

Known issues (v1.37)
  • Bug: Widget becomes unresponsive on some devices. Only work-around is to remove and re-add the widget. Rather use the notification icon than the widget (it works better).
  • Moving BatteryFu to SD card can cause errors and extra battery drain (due to the SD card having to be switched on constantly).


The Dark Knight said...

trying it out right now on my vibrant. I'd be about 20 hours with juice defender so thats the goal to beat.

Carlossal said...

Dude, loving BatteryFu <3 really helping my battery life :D

Francesco Fumelli said...

wow nice appl. just testing... I have android 1.6 on X10 and I have noticed only the problem aboout wifi not enabling right. Apart from! superb app

Nicola Cardinali said...

Great app! But...

I encountered a little bug in my Acer Liquid: the 'Connect time' setting overrides the option 'Data while screen on'. I mean that if I set the connect time to 1 minute, when I turn on the screen, the Data Connection will turn on but only for the duration of 1 minute.

Am I the only one that is facing this little problem?

The application is very smart and far better than JuiceDefender.


Toby said...

@Francesco will look into it although it works well on my side. Might have something to do with Wifi Sleep Policy.

@Nicola Thanks for reporting, I'm looking into this now and will release an update when fixed.

Anonymous said...

Is there any log for this app?
I am trying without success. (Samsung Spica Android 2.1)
I only can see some message on the screen but only for some seconds.

APNDroid also installed. Are they working together?


nils said...


is there a bugtracker or some way to contribute to the project?

Just posting it here for now:
I'd suggest waiting for a small amount of time with the disconnect when screen is beeing locked. It happens regularly to me that the screen is locked while i am reading and i unlock it with the key before i have to manually use the sliding thing, so its just locked for one or two seconds but already disconnects.

JuiceDefender waits until no more data is transferred within a given amount of time. I havent done this before but I think it should be pretty easy by comparing values from (getTotalRxBytes() and getTotalTxBytes() for example) over a period of some seconds.


Anonymous said...

Sorry I'm confused about the Toggle Wifi portion of it. There's already a wifi toggle on top by the notification bar which I just turn off if I want wifi off. So if I turn on Toggle Wifi on your app will it turn off wifi when need be? Can you elaborate on that feature.

Toby said...

@kozsoo There's no log for the app. It doesn't work with APNDroid at all, but it uses a similar technique to toggle mobile data.

@nils Thanks for the suggestion, will add it to my todo list

@anon The "Toggle wifi" option, when enabled, causes BatteryFu to toggle the wifi when it wants to check for e-mail. If both mobile data and wifi are enabled, both will be toggled, and wifi will be used if it's available. If wifi is not enabled, BatteryFu will not mess with it.

Anonymous said...

does not manage to disable my o2 apn on galaxy s. i dont know what more info i should provide to be helpful
apndroid works so its manageable
perhaps this application could use apndroid api and not bother to disable the apn on its own. apndroid api is open afaik
otherwise really good ideea. looking forward to see this fixed. cheers

Toby said...

Could you please e-mail me your APN list? You can use "APN backup and restore" from the market to make a backup.

Yes, APNDroid is open, I've looked at their code. I am currently trying to find a way that does not use APNs which will work for CDMA too.

Nathan said...

Would be great if you could make this program open-source

Toby said...

@Nathan would you contribute? If so, I will consider it :)

Nathan said...

Toby, yeh if I have some free time I'd like to stick a few bits in (like a log file). I've got forks of a few things on , I'd definitely recommend github if you aren't sure where to stick the source.

Mainly though it would just be insurance for if and when you get sick of working on the software, let someone else do the occasional bugfix for new Android versions etc.

Moses said...

HTC Desire, Im having the same problem Nicola Cardinali (sep 6) is having, I have data on when screen on, it activates it but then it turns it off after the connect time expires (2 minutes).

Anonymous said...

On galaxy s : work to disable wifi but not APN,

Thanks a lot

Anonymous said...

Hey i just wanna say great program really great!!!

The only real thing that i miss is when i manuelly put wifi on and than de sleeper becomes active and 1 minute later deactivates i loose my connection.

So i've set it to sleep for 1 hour.
So most off the time i can just browse away for a long time without batteryfu killing my connection.

But i love your program, way better than juicedefender.
Wich shows fake results lol x2.34 without even an minute extra

Fafa said...

Hi !
I am using the latest version of you app and I have the feeling that it is draining my battery when I am in airplane mode.
Is it possible to detect that we are in airplane mode and wait to get out the airplane mode in order to use your scheduler ?
Another point is I am using APNDroid. Can you app detect that APNDroid has disabled the APN in order to disable your scheduler too instead of reporting a configuration error ?

Toby said...

@anonymous - use the "data while screen on" feature, or else disable BatteryFu before browsing, then re-enable it afterwards. That's what I do :-)

@Fafa - Thanks for the feedback, will add to my todo list.

Anonymous said...

Toby, Hi and Thanks.
Q. Does BatteryFu only toggles Dataconnections or does it also starts the syncs of the emailaccounts ? overrides the syncsettings of the accounts ?

Toby said...

A. BatteryFu also starts the sync process as soon as a connection is established. It does not override any settings (as in, it does not change any sync settings), but it does force a sync every time it connects.

SteveDRZ said...


I have a T-Mobile Samsung Vibrant, and I created another APN just for MMS, in order to use BatteryFU, but I have an issue. It seems no matter how I configure my APN's, I am unable to receive/send new MMS, unless it uses the primary APN profile, as "Internet+MMS" When separated, the MMS shows "downloading", but nothing ever happens.

Any ideas? Is there some other place I have to define the MMS APN, in order for it to properly work?

Toby said...

Hi SteveDRZ. Unfortunately I have no idea why that would not work. If you have set up uone APN as "MMS" only, and the other as "Internet" only, then it should have worked. You might have to ring up your service provider and find out from them.

Anonymous said...

Just wanted to say THANK YOU. This has everything I need out of Ultimate Juice Defender and nothing I don't. For free!

Thanks for all your work. Operating perfectly for me with Samsung Vibrant on T-Mobile US.

Fafa said...

Hi Tobby,

Thanks for the new version, i'll test the airplane mode soon :)
I've seen you've added a widget and would it be possible to create another widget in order to force/disable the internet connection (a bit like the APNDroid widget, so i'll be able to get rid of it).
Cheers !

Toby said...

@Fafa - in effect, that is exactly what the BatteryFu widget does. When you toggle it on, your internet will get disabled, and vice versa.

Sean said...

awesome app, love it!
smart, lite and very functional
does it all, save my battery.
thank you very much.

galaxy s 2.1+root+voodoo lagfix

Anonymous said...

Hi. I tried it, didin't really liked the fact that it enabled wifi each time I unlocked my phone (although I think it's a bad setting from my part), but the worst part is that I couldn't get any call when batteryFu was on! I tried several time with and without it (the phone in the same place of course) and each time the same result.
Personnaly I just can't think why data connection or else have an effect on my reception, but that's not the matter, I had ton uninstall it.

milkykung said...

Thank you for your effort. BatteryFu is simply working and capable of saving my battery. Best of all, easy and flexible to use comparing to Juice Defender.

I love your notification with status of BatteryFu being on or off along with its next sync time. Widget looks great on my homescreen and capable to toggle my 3G connection on-the-fly is a plus. GOod job for these awesome features.

Here are some of my thoughts to even make BatteryFU standing out:

1. Current status of the notification icon. ie. different on/off icon
2. Time of the next sync on the widget will be very useful. This is because I usually set the feature of my LaucherPro to hide a notification bar for a beauty sake and BatteryFU is, of course, on my main Homescreen.
3. Tab on widget to access the app directly. This may be via a dedicated small area on the widget for such a function.

SOrry for a long comment and if they are hard for you to implement. This is simply because I'm not a programmer and have no idea on how difficult these things might be.

Thank you very much in advance.

Please keep up your great job TOBY ;D

milkykung said...

Hi Toby :)

It's me again. Sorry for a re-post but I found a bug in your app. It is related to Wifi toggle.

The thing is, I leave "Wifi toggle off" but when BatteryFU enable it after it becomes active. I thought I set it to toggle Wifi but I didn't. Based on your app descriptions, 3G and WiFi have to be activated seperately and it is obvious in your app options.

Please consider fixing this bug because it can even save battery even more.


robert.paech said...

Hi Toby,

First rate application. Thanks!

I have noticed one issue though. Due to my low mobile data rate, I have turned off Sync Gmail and only sync my calendar and contacts. However, with BatteryFu running it seems to sync Gmail anyway. Any idea about what is happening here?

If it is any use, I have a HTC Desire with Android 2.2.



Toby said...

@milkykung thanks for the comments and suggestions! Will work on the notification icon (graphic design is not my strong point ;). Did you know that you can tap on the "BatteryFu" label of the widget to get into the app? :-) As for Wifi going on - are you using the experimental DNS fix? Try the latest version (v1.22), which doesn't meddle with Wifi anymore.

@robert.paech It might be because I force a full sync of all accounts each time it re-connects (which is sometimes necessary). Will look into a less brute force way to sync only enabled accounts.

milkykung said...

Hey Toby :)

You are welcome ^^ I thought you have given up on BatteryFu already as I haven't seen you in the blog for a while. I'm glad to see your reply today.

You are so open-minded. Thank you for considering my suggestions. You are humble to say that you are not goot at graphics :D Your current notification icon looks really lovely and I'd think changing the color from blue to red while inactive could do the job or even using your greyed/ungreyed widget icon should be alright too. The text beside it can say "10 minutes" to sync instead of last time sync. This feature will be extremely useful for a hardcore user like me to force myself to wait till next sync ^^

Regarding a direct link, I just know it from you now that clicking the label links to the app straight away :) What a nice touch :) It should be mentioned in your app descriptions too if not yet included.

Regarding WiFi issue, the answer is "no". I didn't click your DNS fix option on my V1.22. Oddly enough, I uncheck "Wifi", reboot and it has worked fine since then.

Hope all is doing well with you. Thank you so much for listening and please keep up your great work ^^


Dejan said...

Hi Toby,

I am wondering, how do you force the data sync of existing accounts on the phone?

I've googled sth about synchronization manager, but there is not much info how to use it.

Toby said...

@Dejan like so:

Bundle extras = new Bundle(); extras.putBoolean(ContentResolver.SYNC_EXTRAS_FORCE, true); context.getContentResolver().startSync(null, extras);

cmh1995 said...

Thank You sooo much! I have a Virgin~ Samsung Instinct. This app is great! Previous app by someone else resulted in dead battery after 8 hrs. This new app is going strong after 12 hrs and still not even near 50%!! LOVE IT!

Sasha said...

Hi Toby,

I love your app but I have a problem connecting to the Internet after the screen is unlocked. The biggest problem is that it doesn't happen always so I can't really tell you what I did when it happened. It just sometimes work and sometimes don't.
I have the newest app version available on the Market, rooted phone and checked option regarding Android bug #2207.
Can you please help me somehow because I really don't like Juice Defender as it's options are really annoying and complicated...

Toby said...

@Sasha The main reason why it would not reconnect is because the BatteryFu Screen Service got killed. BF will restart the service whenever it wakes up again, which explains why it is intermittent. Please make sure you don't have a task killer killing the service, or that your phone isn't so low on RAM that Android kills it.

To all commenters that posted positive comments, thank you very much! Your positive comments keep me going, so it is much appreciated.

Anonymous said...

Hi Toby

I really like your app however I'm not if it works they way it should....

For some reason I still receive emails during the night cycle - why? I've set it to be off between 2200 and 0800 in the morning.

Funny thing is that it looks like it is working fine during the day time cycle.

luca said...

great application, it uset to 2x battery life of my Magic till 1.22 version, but I can get 1.23 to work, it disable permanently my APN, so I had to revert back to 1.22

Toby said...

@Anon perhaps it's not disabling your data at all. Do you get an APN error? CVan you try the APNdroid option please? It should work better.

@luca can you try the latest version that supports APNdroid? APNdroid has better mobile data toggling than BatteryFu.

Aschenazi said...

I been using this app for 3 months, with no problem. Today, after update I have no more mobile internet, with or without batteryfu enabled or disabled. It shows that is connected to 3G, but there is no connection. Uninstalled the app, still no internet. Reinstalled but still no net. Reverted system settings using mybackupPro but still no joy. Just want my phone working again :(
Anybody had this problem ???
please help

Toby said...

@Aschenazi It might be that you have hit the Android bug #2207. Please try rebooting your phone, your 3G should work thereafter.

See the "DNS fix" FAQ for more info. You can also try using the APNdroid method (install the APNdroid app and enable it in BatteryFu options). The newer versions seem to have found a work-around for this problem.

Aschenazi said...

Is sorted now!
I already done what you sugested a few times yesterday with no joy. What I didn't know is that Orange had some "network problems" im my area. Isn't that some coincidence ??!! I was just about to hard-reset my Desire... :))

milkykung said...

Hi Toby :)

Thank you for your constant update on BatteryFu. Hope everything is well with you.

BatteryFu is the only app I always keep on my main homescreen. I have just one thing to ask you to implement, which is about the start-up time delay. I came across the fact that start-up sync and weather forecast apps were disrupted at the instant BatteryFu starts itself up automatically according to the way I want. I can manually switch it on myself later on but it would be great if you could add such a start-up delay for like 5, 10, 15 mins for initial sync.

Moreover, please could you consider longer connecting time from 5 to 10 or 15 mins. This would be good for my case because I usually set 1, 2 or 3 sleep time but 5 mins are not enough for my apps to sync.

Thank you very much in advance and have a lovely weekend :D

Kind regards,

milkykung said...

Edit: Too bad I cannot edit my old comment. Sorry about this >.<

I meant to say 1, 2 or 3 hours of sleep time :D

Toby said...

@milkykung Both are great suggestions! Rather than startup delay, I will implement a normal sync on startup, followed by sleep cycle. That should do the trick. I will also add longer connect times.

Paulo Mario dos Santos Dias de said...

Hi Toby, thank you for your brilliant application! Very simple and straightforward concept, allowing the user to know exactly what the program is doing at any given time. Are there other sync methods (maybe more aggressive; hacks)that BF can use to force updates of not only the internal accounts (GMail, FB and Twitter) but also 3rd. party widgets like Beautiful Weather, LauncherPro and Pure Messenger Widget? The problem is that these applications can only be set up with a minimum of 15 minutes refresh rate, the same minimum rate as BF. Thus, if such widgets try to update in the middle of every BF sleep cycle, they'll never get a chance of getting synched to the Net.

Anyway, sorry for a long post and regards from a fellow Electronics Engineer in his mid-30's, typing from Brazil! Oh, and please, set up a PayPal donation link on your blog/application!

Toby said...

@Paulo Thanks for the suggestions and comments! Really appreciated :-) Very nice to chat to a fellow Electronics Engineer.

Unfortunately there is no way BF can update the weather widgets without specific integration with each one. Best bet is to ask the widget developer to make a sync account rather than do it manually in their code. I use Fancy Widget, which seems to update every now and then with BF :-) Some of the apps will see a failed sync and try to sync when there is connectivity.

Thanks for encouraging the donation button! Since I don't earn a salary these days, every bit can help ;-)

If you do any (electronics/software) projects in your spare time, please keep in touch, I'd love to know about them.

Anonymous said...

This version stopped working.
A couple of releases back it did work, so is it possible to download an older version? Thanks.

Toby said...

@Anonymous Unfortunately I don't keep copies of old versions. However, I've made several bug fixes in the new release (v1.29) which is now on the Market. Please try it. Also, I highly recommend using the APNdroid option if you are having issues, as it has more reliable mobile switching.

milkykung said...

Thank you for v1.29 Toby. Thank you for adding startup and longer sync ^^

Bug report: Once batteryFu is disabled, saved sleep time is reset to some other values. Changing a sleep time while batteryFu causes this behaviour like never before. However, this bug does not occur when I change sleep time with batteryFu enabled.

Please fix this if it happens on your phone too.


milkykung said...

Edit: I meant>> Changing a sleep time while batteryFu is "disabled" causes this behaviour like never before.

Aschenazi said...

With this last update, BatteryFu doesn't disable data anymore on my HTC Desire. Any ideeas?

Toby said...

@Aschenazi Are you using the APNdroid option? If so, is APNdroid installed? Please try with and without and e-mail me if it still doesn't work.

@milkykung Thanks for reporting, I also noticed something funny about night mode time setting. Will fix in next version!

Nova Cember said...

Didn't get internet connection at all, so I had to uninstall BatteryFu and APNdroid.
But now my Galaxy S won't get connection at all, what should I do now?
Can't even get to Android Market to re-install the programs and see what went wrong...

Toby said...

@Nova please refer to the first FAQ

Nova Cember said...

Yeah, sorry, didn't notice the FAQ.
Already got it sorted out anyway.
Maybe I'll try BatteryFu again now that I am slightly wiser... :/

Anonymous said...

Can you please explain all the settings available in Battery FU?

Thank you!

Some are not that clear, sorry.
examples help too!

Toby said...

@Anonymous the settings are explained above in "Installation and usage" and FAQ, as well as the descriptions in the app itself. If there's a specific setting you want more clarity on, please ask or e-mail me.

Klaus said...

Hi Toby,

Happy Holidays and thank you for this great app! On my Desire 2.2 there's only one problem: the toggle widget is just working two or three times. After deleting the widget and re-installing it again it works for another two or there times.

Is there anything I can do against it?

Thanks, Klaus.

Toby said...

@Klaus Happy holidays to you too! I've seen this happen on one of my Android devices, although it works on the others. I will investigate further and try to squash the bug. It's difficult because it is intermittent, but I don't think there's anything you can do to work around it. Keep and eye out for updates early next year.

Al Newberry said...

I love how your app wiped out my data connection and wouldn't turn it back on. I guess it's called F.U. for a reason.

Toby said...

@Al I don't understand what you mean by "wiped out my data connection", but please see the first FAQ above on how to restore your 3G settings if there is a problem.

sakkil said...

Could you add smaller periods of "Connect time" in future versions?

Thank you for your app!

Toby said...

@sakkil Smaller times will not work, unfortunately. I used to have 1 min and then removed it because it takes about 30 seconds just to reconnect, leaving only 30 seconds to sync, which is not enough time.

Anonymous said...

Hi Toby,

Just trying your app in preference to Juice Defender. So far seem to have no issues.

Would like to make my hotmail client force sync when Gmail etc does though.

You posted "Bundle extras = new Bundle(); extras.putBoolean(ContentResolver.SYNC_EXTRAS_FORCE, true); context.getContentResolver().startSync(null, extras);".

Could you please explain how to and where to do this? Through SDK or CMD etc?


Toby said...

@Anonymous Thanks for trying my app! The code I posted earlier is not for use by users, it's for developers who want to enable their app to force a sync. As a user, you don't need to do anything.

If your hotmail client does not sync when gmail syncs, then it means your hotmail client is not well written. You should try to get another client that uses Android's "Accounts and sync" functionality, so that it does background sync's correctly.

iviarck said...

Having tried Juice Defender and Green Power, Batteryfu is a refreshingly successful app, doing exactly what it is supposed to do. I am getting up to double the battery life as a direct result of using it. Why doesn't the app market allow 6 star ratings?

I have one suggestion for improvement. Sometimes I am reading offline material or playing games which do not require internet and sometimes I am browsing news and tweets and do need internet. The data while screen on toggle setting is slightly frustratingly just a screen scroll down in the options panel. If these more transitory options and settings could appear higher in the options panel, using the app would be made so much simpler for me.

Thank you so much for publishing such an excellent and thoroughly useful app.

Thanks for listening

Toby said...

@iviarck thanks for the kind words and your suggestion. For your use, I would highly recommend using the toggle widget, rather than "data while screen on". Simply long-press your homescreen, add the BatteryFu widget, and then tap the widget icon to toggle mobile data on and off as you need. Also, you can tap the "BatteryFu" text of the widget to bring up the settings screen. If you are having problems with the widget (as some have reported), then an alternative is to install APNdroid, configure BatteryFu to us APNdroid (see above article for details), then put the APNdroid toggle widget on the homescreen. You can then use that widget to toggle data on and off.

Hope that solves your problem. I think it's a lot easier than going into settings all the time :-) Let me know if you still prefer to go into settings, then I will see if I can re-arrange the settings screen a bit.

iviarck said...

I have chosen to use BatteryFu in moved-to-SD mode on my rooted HTC Desire. This means I can't use it as a widget and access it from the notification bar. This works very well for me.

I was using APNDroid until yesterday, when the author put out an update that completely broke their widget. I have since uninstalled it and I am very happy to use BatteryFu's own APN control - it works well and I understand all about the APN name changing to affect control.

Because of these factors it really would suit me well to have the instant change options more readily accessible when I bring up BatteryFu from the notification bar. I would quite understand it if a change of this order would be something of a stretch for a single user.

Thanks for your very detailed response.

Gregor said...


i dont know if this is the place to put suggestion or not, but i'll try:

is it possible for the notification icon to only have the battery without the black border which takes the whole height of the notification area?

If so, that would be supergreat!

Toby said...

@Gregor thanks for the suggestion - it's already on my todo list, hopefully will be done in the next version :-)

Gregor said...

Great news! Thank you. Loving the app.

Sr. Zapata said...

On my Hero GSM with Froydvillain 1.7.2 you can "reactivate" the unresponsive widget by simply moving it around (long press and drop it again).
Nice app!!!

Anonymous said...

Hi toby! I came from using green power but it doesn't remember settings anymore and now I discovered bfu.
As it looks green power is a straight ripoff! How about that!!
I have to say I do miss the green leaf It gave me a warm feeling. But you actualy explain what the app does instead of just offering a false sense of security lollol.

I did have a sugestion but now I don't remembrr... Anyway great app keep up the good work!!! Many thanks

Toby said...

@anonymous Haha, didn't know about green power, just checked it out now. It's like BatteryFu, but you gotta pay for night mode. Plus they say it's leaner, but BF is 51kb and GP is much much more :) Anyway thanks for the comments, much appreciated.

milkykung said...

Hi Toby :)

It has been a while since my last post. Hope all has been well with you these days.

This message is just to say "Hi" to you. I can't wait to see your update. Please do not forget to fix the bug I mentioned as of "December 9, 2010 11:53 PM" above.

Thanks a lot in advance.


Toby said...

@milkykung Hi! I fixed that bug in v1.30. I've just checked now on my phone and the bug does not appear to be in v1.30 - tried enabling/disabling/changing sleep and night mode times, it works as expected.

Gert said...

Hi Toby, just found your app today and as many, i like it a lot. But there is one thing... It seems to enable both data and wifi after screen unlock. Wouldn't it make more sense to check if wifi connects to a known network, if so, turn off data? And the other way around of course.

Toby said...

@Gert by default, if Android connects to wifi, it will turn off the mobile data automatically. They should not both be on at the same time for longer than a second or two. If they are both on continuously, there might be a bug with your device's firmware.

Dave said...

I have a question before I install BF.

I install BF with the option to disable data with the screen on.

I want to use data, so I turn on apndroid.

I turn the screen off, but leave apndroid enabled.

Now, does BF automaticaly turn off apndroid? Or do I need to manualy turn off apndroid?


dave said...


Installed BF, already had apndroid installed. Followed you instructions to toggle apndroid and BF off/on/off.

Worked ok for a while, then had no 3g access.

Reset phone, did not install apndroid. So far everything is working. I'm toggling data with the bf widget.

I would like to see a feature that if I toggle data on, bf would automaticaly turn data off when the screen turns off, and keeps data off until I turn it on again.

I'd pay what you want for that feature.

Toby said...

@dave answer to first question, yes BF will disable apndroid but only at its next connect/disconnect cycle.

Your second suggestion is a good one, great for occasional data use. Will add that to my todo. Currently, you would have to toggle BF off, use data, then toggle back on again. Will have to find a way to make that setting clear to the user without confusing them.

bill said...

Batteryfu works pretty good, thanks for your time developing and sharing this app. I plan to donate.

1: Name: Why the name Batteryfu?

2: Wifi. If I enable wifi, would that be more battery efficient that using 3g data? If I'm not near my wifi signal and my phone keeps searching for a signal, would that consume more battery power than if I just use 3g data?


Toby said...

@anonymous The name? This app does Kung Fu with your Battery ;-)

Enabling wifi would use slightly more battery if not within wifi coverage, but is handy if you're at home/work oftne and want to use wifi bandwidth rather than your 3G data. The battery usage difference is not significant, so you don't need to worry about switching off the wifi option to save battery.

Anonymous said...

Greetings, Toby

I have investigated several "battery saving" apps like Juice Defender and Green Power and am looking at yours. Juice Defender has been "removing" free features unfortunately.

One feature they do offer (that does keep 'em bloated) that I would like to see is a "whitelist" of apps that if either running or actively in the notification bar keep the data on. Example - streaming audio like Pandora or Slacker. I can keep the phone screen off but if these are running, the data (and music) doesn't cut out. Once app is "closed", the data usage is controlled as before. Thanks.

Rick said...

BatteryFu works perfectly for me except for 1 bug on android 2.1
When I enable "data when charging" the data is enabled all the time, when on batteries and when charging. I tried uninstalling and reinstalling, but the same thing happens. Its not a big deal, but I thought I would just give you the feedback.


Toby said...

@Anonymous thanks for the suggestion. As you noted, this is the kind of feature that leads to bloat, so not something I'd want to add to BF. I am not trying to be a free clone of Juice Defender - I am aiming for a simple and lightweight app that works. However, you do have the widget that you can toggle when you need to use data for extended periods.

@Rick thanks for the bug report, I will try to replicate and fix it if I can, although that feature relies on the OS to notify it of charging/disconnect, so I'm not sure there is much I can do about that.

ziggyd1990 said...

I installed the program, didn't want it anymore, disabled it, successfully uninstalled it and yet it still keeps disconnecting my wifi. Went to my settings one my G1, clicked on the default APN it still does the same, apparently it wiped out all of my previous APN settings. So please shed some light on my situation as to how I'm getting back my previous settings or for my wifi to stop disconnecting. I can't reinstall the program because my wifi isn't coming on so.......

Toby said...

@ziggyd1990 if you have uninstalled it, then is it something else disconnecting your wifi. See FAQ above on how to restore APN settings if these are messed up.

John in Vancouver said...

I like your app, saves me a lot of battery life.
Is there any easy way disable auto-sync when battrey fu turns on? I just want to enable data but I don't want anything to sync.

Reason is that I'm using K-9 push mail and I don't want the native android mail to sync. Even though I have the Android sync settings turned off, Batter Fu forces a sync, I just like to disable the forced sync.


andry yudha said...

I recently came accross your blog and have been reading along.
I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
Thanks , for much information,Keep sharing such a wonderful information..!

oiyaa,it's good software

Hi said...

Hi, I can't find travel mode

Toby said...

@Hi you need to enable "Toggle Wifi" in settings to have travel mode. Also, if you are already in travel mode, it will not show up in the list of modes.

Android Games Apps said...

great post :) thanks :D

Laurentiu said...

Hi Toby.
First congrats for your app, nice and clean!

Here is something that I think it can save even more battery:
when both mobile data and Wifi are enabled and controlled by BatteryFu and the screen is off, at the moment you turn it on and BatteryFu kiks in, it first turn on mobile data, and after 30sec or so, WiFi.
If you could make WiFi kick in first, this will spare the battery to deal with a mobile connection every time the phone wakes up.

This happens every time you turn on the screen or the mobile syncs as planned by BatteryFu.

I made a video to be more precise


Toby said...

Hi @Laurentiu, thanks for sharing your idea! I know exactly what you mean, and in my code, I actually enable Wifi first, but it takes Android longer to re-connect the Wifi than it does to enable mobile data. So what I can do is add a "Home/work mode" which is the opposite of "Travel mode", i.e. you know you are within Wifi coverage, so activate Home/work mode and BatteryFu will not enable mobile data, only Wifi. Will add this in next release.

Laurentiu said...

Home/Work mode it's a brilliant idea. I'm eager to see it put into practice.

Battery consumption it's a pain with Android phones. Also, from what I can tell, the mobile data (2G) consumes as much battery as WiFi, and 3G consumes even more.

Great work Toby!

GTRam said...

Hi Toby
Good job. I am a long time user of your app. Now I got a question. Does batteryfu sync the corporate email also? Because I got a doubt when the background data is off I'm not getting my corporate emails.
I dont want to keep the background data to be on also. Is there any workaround?

Thanks for the free app

Toby said...

@GTRam BF will sync any app that creates a Sync account under Settings > Accounts & Sync. Yes, you will need to leave "Background data" on for this to work, but since BF's main purpose is to toggle your data connection, leaving it on is no problem. There is no workaround for this.

Ernie said...

Hello Toby,

I love your app. It awesome. I would like some clarifications on some settings.

Online, offline, and standard mode.

Thanks in advance

Laurentiu said...

Damn... BF just isn't working for LG Optimus One P500 Android 2.3.
I like the concept of BF very much. I tried hard to make it work!

At first I used it along other apps and I had on my phone and it drained the battery fast, in Standard mode, with a connection every 30 min. I suspected other apps were draining the battery.

Then I reset my device to factory settings, I setup only my Google account to bring mail, calendar and Gtalk, that's all, nothing else, everything default. I tested it like this 3 complete charged-discharged cycles.
1st cycle with 2G only, non stop connection, lasted almost 48hours.
2nd cycle with WiFi and 2G, most of the time under full signal WiFi at home and at work, lasted about 60 hours. Yes, WiFi uses less battery than 2G and 3G.
3rd cycle with Battery Fu installed, Standard mode with a 2 min connection every 30 min, toggle WiFi and 2G, night mode on for 8 hours. Lasted about 37 hours.
Man, BF sucks up battery big time while in Standard mode, even while data connection is not in use. In those 30 min of waiting for the next connection, the battery is drained as log as 8 hours of Night mode, why? This is shown pretty accurate by the Battery use native app in Android 2.3.
While in the 8 hours night mode, only 2-3% of battery were used.

If no more updates will come, I will just take my mind of battery savers.

Toby said...

@Ernie - Thanks! The mode are as follows:

Online - stay online always (effectively disable BatteryFu)

Offline - stay offline always

Standard - normal BatteryFu operation, i.e. go offline but go online preidoically and do sync's

Travel mode - same as standard mode, but will not turn on Wifi, so only mobile data is enabled

Toby said...

@Laurentiu - hmm you've got me a bit stumped with that one. I've done that on several devices and it's always yielded more than 3 days of battery!

Note that while BatteryFu is idle (i.e. data off waiting for next sync), it is not actually running at all! There isn't even a background service - it exits and expects Android to wake it up at the right time. So there should be no reason why it would drain battery. Hence why I'm puzzled!

Anyway, some things to check:
- Are you on a CDMA network? BF will only work on a GSM network, unless you install ApnDroid app. Does your data actually turn off when BF starts?
- Are you using ApnDroid? If so, and you are on GSM, can you try it without ApnDroid?
- Try enabling the BF notification so you can see what it's doing, it may help

Worst case, may just use night-mode only, as that seems to work...

Anonymous said...

Okay, thanks to this website I got the automatic APN switching working on my SGS!
It just slightly differs from the instructions here:
Disable/exit batteryfu first, then go to:
your phone settings -> wireless and network -> mobile networks -> access point name -> click on your apn entry -> set apn type to "internet" (default is internet + mms).

Laurentiu said...

Toby,here are the answers to your questions:
- Are you on a CDMA network? BF will only work on a GSM network, unless you install ApnDroid app. Does your data actually turn off when BF starts?
I'm on GSM. BF does turn off my data.
- Are you using ApnDroid? If so, and you are on GSM, can you try it without ApnDroid?
BF works for me without APNdroid.
- Try enabling the BF notification so you can see what it's doing, it may help
I always enabled BF notification, I didn't used it without notification, could this be the cause of the battery drainage?

John N said...

Just a small possible buglet. If Bbattery Fu is running and active, and I then select Airplane Mode, I often (always ??) find that returning from Air mode leaves no data. The solution is to stop B-F and reload the APN from the database.

It suggests a small logic hitch somewhere.

(B-F 1.35, CyanogenMod on a G1

GTRam said...

I got an suggesstion. I'd like to have an option to enable strict periodic data enable. What I mean is whenever I go online in between the sync periods, the next sync time changes. This affects other apps like news/weather widgets, facebook, twitter which are enabled to update their data for every 1hr.
So one option to enable strict periodic sync, to enable sync at 8 am eventhough I had gone online to offline on 7:59 am.

Hope I had explained it clear. Let me know your ideas


otichy said...

Hi Toby,

good looking application, thanks. There seems to be something wrong with syncing through wifi, however.

When I turn wifi on and do manual/automatic sync, everything works just fine. When I turn wifi off, BatteryFu turns it on after 15mins, seems to initiate forced sync (both as set) and keeps syncing for a minute or two, then both sync and wifi goe off at the same moment. So far so good, but nothing is synced :(

Also, when I turn the wifi on manually, BatteryFu doesn't seem to turn it off, is that standard behaviour?

I don;t use any mobile data connection, so I have all that turned off.


Toby said...

@GTRam I've noted your suggestion, it's a good one!

@otichy sounds to me like you need to increase the connect time. I would recommend 5 minutes. Also, BF should turn off Wifi at the next sleep cycle even if you manually turn it on (at least it does on my devices).

otichy said...

Toby, first, thanks for your reply, great to see you take time to respond to the users. I was successful in making the sync = I just needed to enable the wifi manually once and then BatteryFu managed to switch it as expected. However, another problem appeared. Every second or third sync, the phone restarts. This never happens when I connect/sync manually and when I disable BatteryFu, it does not restart. I can't say exactly, when the restart happens, I just leave the phone sleeping and usually about the time the first or second sync should happen (15, 30mins), it's restarted. Is there any log?

(btw. I just tried Green Power and it does exactly the same, I'd much prefer BatteryFu, but the only saver that does not restart is JuiceDefender, but that also does not manage my wifi. So my tip is that when wifi is switched by the saving app, phone sometime crashes. Any ideas?)



Anonymous said...

Hi Toby. Great app.

But for some reason Fu is no more connecting to my home Wifi when the screen is locked.
It used to connect just fine but now it only connects when the screen is unlocked :(
I am not using 3G at all.
I did uninstall Apndroid while back ago. Now that app is no longer free in Market. But iirc it is only needed for the Mobile data, right?

Any advice what to do?

Btw, i concur with the idea of enable strict periodic data that the dude above mentioned. My gmail checks mail on strict periodic as well and if Fu is not on when it checks, well, then gmail wont sync.


Toby said...

@otichy There are logs if you search for the tag "BatteryFu" in the logcat output. You will need the SDK installed to read the logcat output, or else use an app like aLogcat (logcat viewer app)

@Anonymous if you are running a task killer like ATK and it's set to kill apps when screen switches off, maybe BatteryFu gets killed that way. Also if your phone is running out of RAM, it might kill BF. Not sure why else you would get that strange behaviour.

Anonymous said...

I am not running any killer apps nor am I running out of RAM.

I was hoping someone would have had similar experiences and perhaps some advice.

Heck, I am gonna reset the whole phone.

Btw. I have ZTE Blade 2.2


random said...

Hi Toby
Nice app. However, I am not sure if I am using the app most efficiently. I have desire S with following settings
Toggle WiFi - Selected
Toggle Mobile Data - Selected
Start on boot - selected
Show notification - selected
Sleep time - 1 hour
Connect time - 2mins
Data while screen on - selected
Wait till screen unlocked - selected
Delay after screen off - 30sec
Enable night mode - selected between 11.15pm and 5.45am
Force Sync - selected

I dont have the APNDroid App.

Is this optimal use? My battery still lasts only 1 day.

Android app development said...

I like your blog instruction.This is one of the user friendly post. Thanks for your support.
Android app developers

Android developer said...

Your informational post is great resource for lots of Internet users, so i would like to thank for creating this blog.

Anonymous said...

Hey Toby,

Everything was working GREAT, until this last update. For whatever reason, the Use Packet Data gets unchecked and never reenables. So, I have to uncheck Toggle Mobile Data option under Battery FU now. Can you look into this?

Thank you and keep up the good work.

Anonymous said...

Hi toby,
v1.36 was working ok on my Samsung s2, v1.37 does not. I get 'should not do this' when unlocking screen and batteryfu stops working. Please help.

Joker Semprul said...


After last update, toggle mobile data never enable again.
and toggle wifi unchecked but still searching.
#galaxy mini, gingerbread 2.3.4

btw, good work! thanks

Toby Kurien said...

Thanks for the bug report guys. I've seen it happen on my own device so a fix will be coming up soon.

Anonymous said...

Hi Toby,
Thanks a lot for the very quick new release 1.38 that fixed issue found in 1.37 for Samsung S2 at least.

Batteryfu is now fully operationnal and working great. This is my prefered power saving tool :)

Very good job and support.

Anonymous said...

Thank you for the fix Toby,

Anonymous said...

hi Toby, thanks for the good work and the continued effort to improve your app.

is there a way for night mode to come on and off automatically at the fixed time? it doesn't seem to work on my motorola atrix.


Anonymous said...

Hi Toby,

It's still not toggling automatically for my SG2.

If I turn off my wifi, data doesn't come back on automatically.


Android app developers said...

This is one of the reliable information.I like your blog philosophy.This is one of the effective post.

Anonymous said...

I installed BatteryFu... played a bit around with, uninstalled it. And now my cell coverage is complete gone... with luck I get 1 bar where before I got almost always all bars.

Anonymous said...

I tried BatteryFu on my Galaxy S2, it works fine. GREAT App!

It would be even better if we could turn on Flight Mode during the app's Night Mode.


althio said...

Hi and congratulations for your work on this app!

Would it be possible and/or useful to define differents schemes for wifi and data?
Either differents "sleep time", or make data skips a few syncs.

For instance it would allow a sync by wifi (data disabled) every 30 min and a sync by wifi+data every 2 hours.

Anonymous said...

I notice that after unlocking the screen, the wifi icon doesn't show near the clock, although it is functional. It does show in the notifier along with the name of the hotspot but it is a dark grey.

Adrien Bury said...

First thanks a lot for the apps.
Here is my problem.
When I reboot, default settings override my settings.any idea?

Toby Kurien said...

Hi Adrien, sorry no idea.

Honda Malhomme said...

In my ZOPO device ZP980 MTK6589T, soft kill the APN data when screen OFF(good job) but on screen ON, data always OFF. i don't know why. do you have an explanation?

Jon said...

Would you consider open-sourcing BatteryFu on github? I would like to try and contribute some things, f.ex. an option to try wifi and turn it back off again when there is no fix within X seconds. Also I would really hate for BatteryFu to go away (It's great!) if you do not have time to update anymore.


Toby Kurien said...

Hey Jon, I actually don't mind open sourcing it. It works pretty much exactly how I want it, so I wasn't planning any more updates. Might be good to get some pull requests :-) Code is really messy though, as it was one of my first Android apps. Email me your github username and I'll see about uploading me code there.

Jack said...

Future addition? Peak hours and days.

Toby Kurien said...

FYI: I have open-sourced BatteryFu. Get the source at:

Note: GPL v2 licence.

Awais Mahmood said...

Hello, thank you for this great app. Does Night Mode start automatically at the prescribed times?

Toby Kurien said...

If it's enabled in the settings, then yes. If you have any issues, please log them at the new github site:

Anonymous said...

it should not be allowed in the f-froid repository, the default "force sync" accounts steals all your data and uploads it to google etal!

Anonymous said...

Fantastic! Got it from F-droid!
"Force sync" default off is better. Also, "re-enable WiFi with screen on" would save money on data plans.
Thank you for open-sourcing your great app!