Skip to content

ronyaburaihan/NetSpeedIndicator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NetSpeed Indicator πŸš€

Android API Kotlin License Buy Me A Coffee

A modern, feature-rich Android application for real-time network speed monitoring and data usage tracking

Features β€’ Screenshots β€’ Architecture β€’ Installation β€’ Contributing β€’ License


πŸ“± Overview

NetSpeed Indicator is a powerful Android application that provides real-time network speed monitoring and comprehensive data usage tracking. Built with modern Android development practices, it offers a beautiful Material Design 3 UI with support for both light and dark themes, dynamic colors, and a seamless user experience.

✨ Key Highlights

  • 🎯 Real-time Speed Monitoring - Track download and upload speeds with live updates
  • πŸ“Š Data Usage Analytics - Monitor daily and monthly data consumption
  • πŸŒ“ Material Design 3 - Beautiful UI with dynamic theming and dark mode
  • πŸ—οΈ Clean Architecture - Maintainable, testable, and scalable codebase
  • πŸ”‹ Battery Optimized - Efficient background service with minimal battery impact
  • πŸš€ Modern Tech Stack - Jetpack Compose, Kotlin Coroutines, Hilt, Room

🎯 Features

Core Features

🌐 Real-Time Speed Monitoring

  • Live download and upload speed tracking
  • Total speed calculation and display
  • Persistent notification with speed information
  • Visual speed indicators with animations
  • Historical peak speed tracking

πŸ“ˆ Data Usage Tracking

  • Daily data usage monitoring (WiFi and Mobile separately)
  • Monthly usage statistics and trends
  • Automatic data categorization (Download/Upload)
  • Usage history with detailed breakdowns
  • Reset at midnight for accurate daily tracking

🎨 Beautiful User Interface

  • Material Design 3 implementation
  • Dynamic color support (Material You)
  • Light and dark theme support
  • Smooth animations and transitions
  • Intuitive navigation and layout
  • Custom font family (Outfit)

βš™οΈ Advanced Settings

  • Theme customization (Light/Dark/System)
  • Dynamic color toggle
  • Lock screen notification control
  • Upload speed display toggle
  • Battery optimization settings
  • Auto-start permission management

πŸ”” Smart Notifications

  • Persistent foreground notification
  • Real-time speed updates in notification
  • Data usage summary
  • Signal strength indicator
  • Customizable notification visibility

πŸ”„ Background Service

  • Reliable foreground service
  • Automatic restart after device reboot
  • WorkManager health checks
  • Crash-resistant implementation
  • Graceful error handling

πŸ“Έ Screenshots

Dashboard History Settings

Beautiful Material Design 3 UI with dynamic theming


πŸ—οΈ Architecture

NetSpeed Indicator follows Clean Architecture principles with MVVM pattern, ensuring a maintainable, testable, and scalable codebase.

Architecture Layers

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Presentation Layer              β”‚
β”‚  (UI, ViewModels, Navigation)           β”‚
β”‚  β€’ Jetpack Compose                      β”‚
β”‚  β€’ Material Design 3                    β”‚
β”‚  β€’ Type-safe Navigation                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          Domain Layer                   β”‚
β”‚  (Business Logic, Use Cases)            β”‚
β”‚  β€’ Pure Kotlin                          β”‚
β”‚  β€’ Framework Independent                β”‚
β”‚  β€’ Repository Interfaces                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Data Layer                    β”‚
β”‚  (Repositories, Data Sources)           β”‚
β”‚  β€’ Room Database                        β”‚
β”‚  β€’ DataStore Preferences                β”‚
β”‚  β€’ Android APIs (TrafficStats, etc.)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Structure

app/src/main/java/com/englesoft/netspeedindicator/
β”œβ”€β”€ presentation/              # UI Layer (MVVM)
β”‚   β”œβ”€β”€ app/                  # Application-level components
β”‚   β”œβ”€β”€ screen/               # Feature screens
β”‚   β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”‚   β”œβ”€β”€ home/        # Dashboard screen
β”‚   β”‚   β”‚   β”œβ”€β”€ history/     # Usage history
β”‚   β”‚   β”‚   └── settings/    # App settings
β”‚   β”‚   └── onboarding/      # Onboarding flow
β”‚   β”œβ”€β”€ component/            # Reusable UI components
β”‚   β”œβ”€β”€ navigation/           # Navigation setup
β”‚   └── theme/                # UI theming
β”‚
β”œβ”€β”€ domain/                   # Business Logic Layer
β”‚   β”œβ”€β”€ model/               # Domain entities
β”‚   β”œβ”€β”€ repository/          # Repository contracts
β”‚   └── usecase/             # Business operations
β”‚
β”œβ”€β”€ data/                     # Data Layer
β”‚   β”œβ”€β”€ datasource/          # Data sources
β”‚   β”œβ”€β”€ local/               # Local storage (Room)
β”‚   β”œβ”€β”€ mapper/              # Data transformation
β”‚   β”œβ”€β”€ manager/             # State managers
β”‚   β”œβ”€β”€ preferences/         # SharedPreferences
β”‚   └── repository/          # Repository implementations
β”‚
└── core/                     # Cross-cutting concerns
    β”œβ”€β”€ di/                  # Dependency Injection
    β”œβ”€β”€ service/             # Android services
    β”œβ”€β”€ receiver/            # Broadcast receivers
    └── util/                # Utilities

Key Architectural Components

1. Clean Architecture Benefits

  • βœ… Separation of Concerns - Each layer has a single responsibility
  • βœ… Testability - Easy to unit test each layer independently
  • βœ… Maintainability - Changes in one layer don't affect others
  • βœ… Scalability - Easy to add new features
  • βœ… Independence - UI, database, and frameworks are independent

2. MVVM Pattern

  • Model - Domain entities and business logic
  • View - Jetpack Compose UI components
  • ViewModel - State management and UI logic

3. Result Wrapper

Consistent error handling across all layers:

sealed class Result<out T> {
    data class Success<T>(val data: T) : Result<T>()
    data class Error(val message: String, val code: Int? = null) : Result<Nothing>()
    data object Loading : Result<Nothing>()
}

πŸ› οΈ Tech Stack

Core Technologies

  • Language: Kotlin 100%
  • UI Framework: Jetpack Compose
  • Architecture: Clean Architecture + MVVM
  • Dependency Injection: Hilt
  • Async Programming: Kotlin Coroutines & Flow

Android Jetpack

  • Compose: Declarative UI framework
  • ViewModel: Lifecycle-aware state management
  • Room: Local database
  • DataStore: Preferences storage
  • Navigation: Type-safe navigation
  • WorkManager: Background task scheduling

Libraries & Tools

  • Material Design 3: Modern design system
  • Kotlin Serialization: JSON serialization
  • TrafficStats API: Network speed monitoring
  • NetworkStatsManager: Detailed usage statistics

Build & Development

  • Gradle KTS: Kotlin DSL build scripts
  • Version Catalogs: Centralized dependency management
  • KSP: Kotlin Symbol Processing
  • Min SDK: 28 (Android 9.0)
  • Target SDK: 36 (Android 15)

πŸ“¦ Installation

Prerequisites

  • Android Studio Ladybug or later
  • JDK 11 or later
  • Android SDK 28 or later
  • Gradle 8.0 or later

Setup Instructions

  1. Clone the repository

    git clone https://github.com/ronyaburaihan/NetSpeedIndicator.git
    cd NetSpeedIndicator
  2. Open in Android Studio

    • Open Android Studio
    • Select "Open an Existing Project"
    • Navigate to the cloned directory
    • Wait for Gradle sync to complete
  3. Build the project

    ./gradlew build
  4. Run on device/emulator

    ./gradlew installDebug

Required Permissions

The app requires the following permissions:

  • INTERNET - Network access
  • ACCESS_NETWORK_STATE - Network state monitoring
  • ACCESS_WIFI_STATE - WiFi state monitoring
  • FOREGROUND_SERVICE - Background monitoring
  • POST_NOTIFICATIONS - Notification display (Android 13+)
  • PACKAGE_USAGE_STATS - Detailed usage statistics (requires manual grant)
  • RECEIVE_BOOT_COMPLETED - Auto-start after reboot
  • REQUEST_IGNORE_BATTERY_OPTIMIZATIONS - Reliable background operation

πŸš€ Usage

First Launch

  1. Grant necessary permissions when prompted
  2. Enable "Usage Access" permission in settings
  3. Optionally disable battery optimization for reliable monitoring
  4. The service starts automatically and begins monitoring

Dashboard

  • View real-time download and upload speeds
  • Monitor today's total data usage
  • See breakdown by WiFi and Mobile data
  • Track download and upload separately

History

  • View daily usage for current month
  • Switch between current month, last month, and last 3 months
  • See detailed breakdown for each day
  • Monthly summary with total usage

Settings

  • Customize app theme (Light/Dark/System)
  • Enable/disable dynamic colors
  • Control lock screen notification visibility
  • Toggle upload speed display
  • Manage battery optimization
  • Configure auto-start permission

Stopping the Service

  • Tap the power button in the top-right corner
  • Confirm to stop monitoring and close the app
  • Service stops gracefully and saves all data

πŸ”§ Configuration

Build Variants

  • Debug: Development build with logging
  • Release: Production build with ProGuard

Customization

Change App Theme

// In SettingsScreen
viewModel.setAppTheme(theme)
// 0 = System, 1 = Light, 2 = Dark

Adjust Monitoring Interval

// In SpeedMonitorService.kt
private const val SAVE_INTERVAL_MS = 60_000L // 1 minute
private const val OPERATION_TIMEOUT_MS = 5_000L // 5 seconds

Modify WorkManager Health Check

// In ServiceHelper.kt
val workRequest = PeriodicWorkRequestBuilder<ServiceRestartWorker>(
    15, // Minutes
    TimeUnit.MINUTES
).build()

πŸ§ͺ Testing

Run Unit Tests

./gradlew test

Run Instrumented Tests

./gradlew connectedAndroidTest

Test Coverage

  • Unit tests for ViewModels
  • Unit tests for Use Cases
  • Unit tests for Repositories
  • Integration tests for database operations

πŸ“Š Performance

Optimizations

  • Efficient Data Collection: Minimal CPU usage
  • Smart Caching: Reduces database queries
  • Lazy Loading: Loads data on demand
  • Coroutine Optimization: Non-blocking operations
  • Memory Management: No memory leaks

Battery Impact

  • Minimal Battery Drain: ~1-2% per day
  • Optimized Notifications: Updates only when needed
  • Smart Scheduling: WorkManager for health checks
  • Doze Mode Compatible: Survives battery optimization

🀝 Contributing

Contributions are welcome! Please follow these guidelines:

How to Contribute

  1. Fork the repository
  2. Create a feature branch
    git checkout -b feature/amazing-feature
  3. Follow the coding standards
    • Use Kotlin coding conventions
    • Follow Clean Architecture principles
    • Write meaningful commit messages
    • Add comments for complex logic
  4. Write tests
    • Add unit tests for new features
    • Ensure existing tests pass
  5. Commit your changes
    git commit -m 'Add amazing feature'
  6. Push to the branch
    git push origin feature/amazing-feature
  7. Open a Pull Request

Code Style

  • Follow Kotlin Coding Conventions
  • Use meaningful variable and function names
  • Keep functions small and focused
  • Add KDoc comments for public APIs
  • Maintain Clean Architecture separation

Reporting Issues

  • Use the issue tracker to report bugs
  • Provide detailed reproduction steps
  • Include device information and Android version
  • Attach logs if applicable

πŸ› Known Issues

Currently, there are no known critical issues. For minor issues and feature requests, please check the Issues page.


πŸ“„ License

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

MIT License

Copyright (c) 2026@ronyaburaihan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ‘¨β€πŸ’» Author

Abu Raihan Rony


πŸ’– Support

If you find this project helpful, please consider:

  • ⭐ Starring the repository
  • πŸ› Reporting bugs
  • πŸ’‘ Suggesting new features
  • πŸ”€ Contributing code
  • β˜• Buying me a coffee

Buy Me A Coffee

Your support helps maintain and improve this project!


πŸ™ Acknowledgments

  • Android Team - For excellent Jetpack libraries
  • Material Design Team - For beautiful design guidelines
  • Kotlin Team - For the amazing programming language
  • Open Source Community - For inspiration and support
  • Contributors - For making this project better

πŸ“ž Contact & Support

Get Help

Stay Updated

  • ⭐ Star this repository to get notifications
  • πŸ‘€ Watch for new releases
  • πŸ”” Follow for updates

πŸ“ˆ Project Stats

GitHub stars GitHub forks GitHub watchers GitHub issues GitHub pull requests GitHub last commit


Made with ❀️ using Clean Architecture and Jetpack Compose

If you like this project, please give it a ⭐!

⬆ Back to Top

About

A modern Android app for real-time network speed monitoring and data usage tracking. Built with Jetpack Compose, Clean Architecture, and Material Design 3, it provides beautiful UI with dynamic theming while efficiently tracking WiFi and mobile data consumption in the background.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages