BatteryFu (pronounced Battery-Foo, like in Kung-Fu) is an Android app that extends battery life (and lowers data usage) by changing always-on mobile/wifi data to periodic sync (meaning it disables your mobile data and/or Wifi, then checks your accounts every X minutes).
Java
Latest commit 33ef333 Sep 21, 2015 @tobykurien ignore .settings
Failed to load latest commit information.
Widgets
gradle/wrapper
graphics
libs
res
src
.classpath
.gitignore
.project
AndroidManifest.xml
LICENSE
README.md
build.gradle
dark.png
gradlew
gradlew.bat added Gradle build files Feb 1, 2014
light.png Import of BatteryFu v1.43 and Widget dependency from older version of Jan 31, 2014
lint.xml
proguard-project.txt
project.properties
settings.gradle

README.md

BatteryFu

BatteryFu (pronounced Battery-Foo, like in Kung-Fu) is an Android app that extends battery life (and lowers data usage) by changing always-on mobile/wifi data to periodic sync (meaning it disables your mobile data and/or Wifi, then checks your accounts every X minutes).

Integration

You can control BatteryFu from another app by broadcasting Intents. The Intents should have their action set to batteryfu.intent.action.TOGGLE, and the action URI is used to specify that to toggle, for example data://on to enable data, and data://off to disable it. Here is an example:

// turn data on
Intent intent = new Intent();
intent.setAction("batteryfu.intent.action.TOGGLE");
intent.setData(Uri.parse("data://on"));
sendBroadcast(intent);

Other schemes you can toggle are:

  • batteryfu - enable/disable BatteryFu
  • nightmode - enable/disable nightmode
  • travelmode - enable travel mode
  • standardmode - enable standard mode
  • offlinemode - enable "always offline" mode
  • onlinemode - enable "always online" mode
  • sync - perform a data sync, turn data on if necessary
  • data - enable/disable data (mobile and/or wifi, depending on settings)

See the Intent filter in the AndroidManifest.xml file for the full list of intent schemes.

Dependencies

BatteryFu depends on the https://github.com/koush/Widgets library, but an older version of it. It won't compile with newer versions, so a copy of the library source is included in the Widgets/ folder. You can use Gradle to build, or import Widgets as a project into Eclipse and add it as an Android library.

Credits