kissfu / batteryhub

:seedling: Android battery monitor app

Home Page:https://greenhubproject.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

About

:seedling: Android battery monitor app

https://greenhubproject.org

License:Apache License 2.0


Languages

Language:Java 98.6%Language:XSLT 1.4%