Git Product home page Git Product logo

josh1n / batteryfu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tobykurien/batteryfu

0.0 1.0 0.0 707 KB

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).

License: GNU General Public License v2.0

Java 100.00%

batteryfu's Introduction

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

batteryfu's People

Contributors

tobykurien avatar andyboeh avatar poussinou avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.