Coder Social home page Coder Social logo

batteryhub's Introduction

GreenHub BatteryHub

Build Status Codacy Badge

GreenHub is a collaborative approach to power consumption analysis of Android devices.

The GreenHub mobile app is a fork of the Carat Project.

Learn more at greenhubproject.org.

Disclamer: The project is still under development, the beta testing is now over. At the moment there is available a release candidate version.

Build Instructions

Gradle

Linux and Mac OS:

Make sure gradlew is executable, by typing this command:

$ chmod +x gradlew

You can now build and test the project:

$ ./gradlew assembleDebug
$ ./gradlew check

Windows:

$ gradlew.bat assembleDebug
$ gradlew.bat check

Docker

If it is the first time building the Android app with Docker, it is necessary to build a local Docker image before running it. Afterwards just run a container:

$ docker build -t greenhub-project/batteryhub .  # Only necessary for first build
$ docker run -it --name container-name \         # Choose a container name
-v `pwd`:/usr/src/app \                          # DO NOT change this src path
hmatalonga/greenhub-android \
/bin/sh -c \
"./gradlew assembleDebug; ./gradlew check"

To execute another gradle task, simply create a new container:

$ docker run -it --name container-name \        # Choose another container name
-v `pwd`:/usr/src/app \                         # DO NOT change this src path
greenhub-project/batteryhub \
/bin/sh -c \
"./gradlew task-name"

To start an existing container, type:

$ docker start -i container-name

One line build, for copy-paste:

docker build -t greenhub-project/batteryhub . && docker run -it --name greenhub-app -v `pwd`:/usr/src/app greenhub-project/batteryhub /bin/sh -c "./gradlew assembleDebug; ./gradlew check"

To list all available gradle tasks run ./gradlew tasks.

Need help?

Having problems building GreenHub? Please see the Troubleshooting guide.

For more details, please check our documentation.

Issues

If you think you have found a bug or have a feature request, refer to the issues page, proper labels are provided. Before opening a new issue, be sure to search existing ones to avoid duplicates. Please try to include steps to reproduce the problem.

Known issues

  • Some Android devices don't support current measurement with BatteryManager API. Legacy support is being developed
  • Power Indicator is not working properly, see issue

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards and development process.

Code of Conduct

GreenHub has adopted a code of conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

License

Copyright (c) 2017 Hugo Matalonga & João Paulo Fernandes.

The code is available under the Apache 2.0 License unless otherwise stated in the file or by a dependency's license file.

Acknowledgments

GreenHub was originally inspired by and has used data definitions from:

It uses battery percentage icons from the project:

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.