Skip to content

Suffixdigital/Charging-Tracker

Repository files navigation

Charging Tracker

Monitor your device's charging patterns and optimize battery health!

App Screenshot

Overview

Charging Tracker is an Android application that helps you understand your device's charging habits. By logging and analyzing charging sessions, it provides insights that can help you make more informed decisions about how you charge your device, potentially extending battery lifespan.

Features

  • Automatic Charging Session Logging: The app automatically detects when your device starts and stops charging, recording the date, time, and duration of each session.
  • Battery Level Tracking: Monitors the battery percentage throughout each charging session, providing a detailed history.
  • Charging Statistics: Offers an overview of your charging behavior, including:
    • Total time spent charging
    • Average charging time per day/week/month
    • Frequency of charging sessions
  • Background Operation: Uses foreground services to operate seamlessly in the background.
  • Data Persistence: Stores charging data locally using a database.
  • Charging Speed: Track how fast your phone is charging.
  • User-Friendly Interface: Provides a clear and easy-to-understand overview of your charging data.

Tech Stack

  • Kotlin: The primary programming language for the application.
  • Android Jetpack:
    • Lifecycle: lifecycle-runtime, lifecycle-runtime-ktx, lifecycle-livedata, lifecycle-livedata-core, lifecycle-process, lifecycle-service, lifecycle-viewmodel, lifecycle-viewmodel-savedstate: Manages the lifecycle of UI components and handles data persistence.
    • Data Binding: viewbinding, databinding-runtime, databinding-adapters, databinding-ktx: Binds UI components to data sources for efficient and responsive updates.
    • Navigation: navigation-fragment-ktx, navigation-fragment: Manages in app navigation.
    • Core: core-ktx, core, core-viewtree: Provides core functionalities and utilities for Android development.
    • Activity: activity-ktx, activity: Manages app activities.
    • Fragment: fragment-ktx: Manages fragments for modular UI design.
    • Startup: startup-runtime: Initializes app components efficiently.
    • Saved State: savedstate: Handles saving and restoring UI state.
    • Annotation Experimental: annotation-experimental: Used for experimental annotations.
    • Versioned Parcelable: versionedparcelable: Handles versioning of data passed in intents.
    • Arch Core: core-runtime: Provides runtime components for Jetpack libraries.
  • Gradle: For building and managing dependencies.

Getting Started

Prerequisites

  • Android Studio (latest stable version recommended).
  • Android device or emulator running Android API level 24 or higher (as suggested by the use of modern libraries).
  • Basic understanding of Android development, Kotlin, and Gradle.

Installation

  1. Clone the Repository: bash git clone https://github.com/your-username/charging-tracker.git
  • Replace https://github.com/your-username/charging-tracker.git with the actual URL of your repository.
  1. Open in Android Studio:

    • Launch Android Studio.
    • Select "Open an Existing Project."
    • Navigate to the cloned directory and select it.
  2. Build and Run:

    • Wait for Gradle to sync the project.
    • Connect your Android device or start an emulator.
    • Click the "Run" button to build and install the app.

Usage

  1. Launch the Charging Tracker app on your device.
  2. The app will automatically begin tracking charging sessions whenever you plug in your device.
  3. Review the collected data in the app's user interface.

Contributing

Contributions are welcome! If you'd like to contribute to the Charging Tracker project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix: git checkout -b feature/your-feature-name.
  3. Make your changes and commit them with clear messages.
  4. Push your changes to your forked repository.
  5. Submit a pull request to the main branch of the main repository.

Future Enhancements

  • Customizable Notifications: Add the ability to set charging thresholds and notifications.
  • Battery Health Analysis: Develop insights into the overall health of the device battery.
  • Data Export: Allow users to export charging data in various formats (CSV, etc.).
  • UI/UX Improvements: Improve the user interface and experience of the app.
  • Improve Data Extraction: Add more features to the data extracted during the charging process.

Contact

If you have any questions, suggestions, or issues, please open an issue on GitHub or contact:

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Thank you to the Android Jetpack team for their powerful and efficient libraries.
  • Thanks to the open-source community.

Notes:

  • Placeholders: Remember to replace the placeholder values like [path/to/your/screenshot.png], https://github.com/your-username/charging-tracker.git, [Your Name], [your.email@example.com], [Your GitHub profile] and LICENSE with your actual information.

  • Screenshot: Add a screenshot of the app to the top to make it more visually appealing.

  • Customization: Tailor the "Features," "Future Enhancements," "Contact," and "Acknowledgments" sections to reflect the specific details of your project. Add more sections if needed, or remove unneeded sections.

  • Dependencies: I've included all the dependencies you shared in the "Tech Stack" section.

  • Assumptions: I've made some assumptions about the app's functionality based on its name and the libraries it uses. Feel free to add or remove features to match what the app can actually do.

  • data_extraction_rules.xml: I've also inferred that you are using a data_extraction_rules.xml file, due to the file being included in your context. You may want to add a section related to this, if it is relevant.

  • Replace https://github.com/your-username/charging-tracker.git with the actual URL of your repository.

  1. Open in Android Studio:

    • Launch Android Studio.
    • Select "Open an Existing Project."
    • Navigate to the cloned directory and select it.
  2. Build and Run:

    • Wait for Gradle to sync the project.
    • Connect your Android device or start an emulator.
    • Click the "Run" button to build and install the app.

Usage

  1. Launch the Charging Tracker app on your device.
  2. The app will automatically begin tracking charging sessions whenever you plug in your device.
  3. Review the collected data in the app's user interface.

Contributing

Contributions are welcome! If you'd like to contribute to the Charging Tracker project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix: git checkout -b feature/your-feature-name.
  3. Make your changes and commit them with clear messages.
  4. Push your changes to your forked repository.
  5. Submit a pull request to the main branch of the main repository.

Future Enhancements

  • Customizable Notifications: Add the ability to set charging thresholds and notifications.
  • Battery Health Analysis: Develop insights into the overall health of the device battery.
  • Data Export: Allow users to export charging data in various formats (CSV, etc.).
  • UI/UX Improvements: Improve the user interface and experience of the app.
  • Improve Data Extraction: Add more features to the data extracted during the charging process.

Contact

If you have any questions, suggestions, or issues, please open an issue on GitHub or contact:

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Thank you to the Android Jetpack team for their powerful and efficient libraries.
  • Thanks to the open-source community.

Notes:

  • Placeholders: Remember to replace the placeholder values like [path/to/your/screenshot.png], https://github.com/your-username/charging-tracker.git, [Your Name], [your.email@example.com], [Your GitHub profile] and LICENSE with your actual information.
  • Screenshot: Add a screenshot of the app to the top to make it more visually appealing.
  • Customization: Tailor the "Features," "Future Enhancements," "Contact," and "Acknowledgments" sections to reflect the specific details of your project. Add more sections if needed, or remove unneeded sections.
  • Dependencies: I've included all the dependencies you shared in the "Tech Stack" section.
  • Assumptions: I've made some assumptions about the app's functionality based on its name and the libraries it uses. Feel free to add or remove features to match what the app can actually do.
  • data_extraction_rules.xml: I've also inferred that you are using a data_extraction_rules.xml file, due to the file being included in your context. You may want to add a section related to this, if it is relevant.

This comprehensive README.md should give you a very good starting point!