# blankj/androidutilcode

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/blankj-androidutilcode).**

33,657 stars · 10,642 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/Blankj/AndroidUtilCode
- Homepage: https://blankj.com/2016/07/31/android-utils-code/
- awesome-repositories: https://awesome-repositories.com/repository/blankj-androidutilcode.md

## Topics

`android` `androidx` `app` `bar` `cache` `encode` `encrypt` `eventbus` `file` `fragment` `log` `network` `permission` `reflect` `regex` `snackbar` `spannable-string` `thread-pool` `toast` `utils`

## Description

AndroidUtilCode is an Android utility library and system API wrapper designed to reduce development boilerplate. It provides a collection of helper classes for common tasks including system settings management, file I/O, and hardware access.

The project distinguishes itself through a comprehensive toolset for device management and UI assistance. It includes specialized capabilities for monitoring battery status, managing system volume and brightness, and implementing UI helpers to prevent duplicate click events. It also provides a dedicated system for coordinate conversion between different mapping standards.

The library covers broad capability areas including data processing for array manipulation and transliteration, persistent disk caching and filesystem operations, and location services. It further implements a publish-subscribe event bus for decoupled communication and provides tools for activity lifecycle tracking, crash capture, and runtime permission management.

The codebase utilizes a static utility pattern to provide direct access to these functions without requiring object instantiation.

## Tags

### Mobile Development

- [Android Development](https://awesome-repositories.com/f/mobile-development/android-ecosystem/android-development.md) — Provides a comprehensive suite of utility classes to reduce boilerplate in Android application development.
- [Android Libraries](https://awesome-repositories.com/f/mobile-development/android-ecosystem/android-libraries.md) — Provides a comprehensive suite of pre-written helper classes to extend functionality across various Android application tasks.
- [Android Activity Lifecycle Management](https://awesome-repositories.com/f/mobile-development/android-activity-lifecycle-management.md) — Offers tools to track and control Android activity lifecycle events and screen state transitions. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/utilcode/README-CN.md))
- [Android UI Components](https://awesome-repositories.com/f/mobile-development/android-ecosystem/android-ui-components.md) — Offers helpers for managing screen dimensions, status bar styling, and preventing duplicate click events.
- [Battery Status Monitors](https://awesome-repositories.com/f/mobile-development/battery-status-monitors.md) — Tracks battery level changes and triggers listeners when the device power state changes. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/subutil/README-CN.md))
- [Location Services](https://awesome-repositories.com/f/mobile-development/mobile-capabilities/location-services.md) — Implements mobile-native capabilities for checking GPS availability and retrieving physical addresses from coordinates. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/subutil/README.md))
- [Mobile Device Management](https://awesome-repositories.com/f/mobile-development/mobile-infrastructure-security/mobile-device-management.md) — Enables high-level system tasks including silent installation, device rebooting, and toggling mobile data. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/subutil/README-CN.md))
- [System Intent Handlers](https://awesome-repositories.com/f/mobile-development/system-intent-handlers.md) — Implements helpers to trigger system actions like installing software or opening app-specific settings pages. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/CHANGELOG.md))

### Part of an Awesome List

- [Runtime Permissions](https://awesome-repositories.com/f/awesome-lists/devtools/runtime-permissions.md) — Simplifies the process of checking and requesting runtime system permissions for protected device features.
- [Text and String Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/text-and-string-utilities.md) — Manipulates spannable strings and regular expressions for rich text layouts and input validation. ([source](https://github.com/blankj/androidutilcode#readme))
- [Android Development Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/android-development-utilities.md) — Comprehensive collection of common Android utility functions.
- [Utility Libraries](https://awesome-repositories.com/f/awesome-lists/devtools/utility-libraries.md) — Comprehensive library of Android utility functions.

### Data & Databases

- [Data Manipulation Libraries](https://awesome-repositories.com/f/data-databases/data-manipulation-libraries.md) — Includes functions for data type conversion, array manipulation, and Chinese to Pinyin transliteration.
- [Disk Caching Systems](https://awesome-repositories.com/f/data-databases/disk-caching-systems.md) — Saves bitmaps and JSON data to the local filesystem to reduce network requests and computation.
- [Mobile File Storage Helpers](https://awesome-repositories.com/f/data-databases/file-storage-systems/mobile-file-storage-helpers.md) — Handles disk caching, filesystem operations, and saving media directly to the device photo gallery.
- [Data Format Converters](https://awesome-repositories.com/f/data-databases/data-format-converters.md) — Transforms data between formats, such as converting integers to hexadecimal strings. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/CHANGELOG.md))

### Development Tools & Productivity

- [Development Utility Libraries](https://awesome-repositories.com/f/development-tools-productivity/development-utility-libraries.md) — Reduces development boilerplate by providing static utility classes for common system tasks and data manipulation. ([source](https://github.com/blankj/androidutilcode#readme))
- [Clipboard Management](https://awesome-repositories.com/f/development-tools-productivity/clipboard-management.md) — Provides utilities to read and write text and binary data to the system clipboard. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/CHANGELOG.md))

### Operating Systems & Systems Programming

- [Geospatial Coordinate Transformations](https://awesome-repositories.com/f/operating-systems-systems-programming/geospatial-coordinate-transformations.md) — Converts geographic coordinates between different mapping standards like WGS84 and GCJ02.
- [Audio Volume APIs](https://awesome-repositories.com/f/operating-systems-systems-programming/audio-volume-apis.md) — Provides programmatic interfaces to adjust the device audio output levels. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/CHANGELOG.md))
- [Filesystem Operations](https://awesome-repositories.com/f/operating-systems-systems-programming/filesystem-operations.md) — Provides low-level operations for directory manipulation and calculating filesystem storage space. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/CHANGELOG.md))
- [System Intent Integration](https://awesome-repositories.com/f/operating-systems-systems-programming/system-intent-integration.md) — Triggers device settings and app store pages by broadcasting specific system actions to the Android framework.

### Software Engineering & Architecture

- [System API Wrappers](https://awesome-repositories.com/f/software-engineering-architecture/token-standard-implementations/safe-interaction-wrappers/system-api-wrappers.md) — Wraps Android system services, permissions, and device metadata to simplify API interactions.
- [Application Information](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/app-bootstrap-and-identity/application-information.md) — Enables retrieval of system metadata including version codes, signatures, and installation status for applications. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/utilcode/README.md))
- [Application Lifecycle Monitors](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-monitors.md) — Monitors application foreground and background transitions to respond to system-level lifecycle events. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/utilcode/README-CN.md))
- [Static Utility Patterns](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/design-patterns/static-utility-patterns.md) — Groups system functions into stateless utility classes to avoid unnecessary object instantiation.
- [Event Bus Systems](https://awesome-repositories.com/f/software-engineering-architecture/event-bus-systems.md) — Implements a publish-subscribe event bus to facilitate decoupled communication between application components. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/utilcode/README.md))

### System Administration & Monitoring

- [Device Management Tools](https://awesome-repositories.com/f/system-administration-monitoring/device-management-tools.md) — Offers tools to control system settings such as volume, brightness, and battery monitoring.
- [Crash Reporting](https://awesome-repositories.com/f/system-administration-monitoring/crash-reporting.md) — Provides a mechanism to capture uncaught exceptions and report application runtime crashes. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/CHANGELOG.md))
- [Hardware Brightness Management](https://awesome-repositories.com/f/system-administration-monitoring/hardware-brightness-management.md) — Provides capabilities to read and modify screen brightness and toggle automatic brightness settings. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/utilcode/README-CN.md))
- [Log Management](https://awesome-repositories.com/f/system-administration-monitoring/log-management.md) — Offers utilities for writing logs to consoles or files and intercepting output via listeners. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/CHANGELOG.md))

### Networking & Communication

- [Publish-Subscribe Systems](https://awesome-repositories.com/f/networking-communication/publish-subscribe-systems.md) — Implements a publish-subscribe event bus to decouple components via a central event dispatcher.

### Programming Languages & Runtimes

- [Array Manipulation Utilities](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-structure-utilities/array-manipulation-utilities.md) — Provides functions for sorting, reversing, and converting between arrays and lists. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/utilcode/README-CN.md))

### Scientific & Mathematical Computing

- [Location Services](https://awesome-repositories.com/f/scientific-mathematical-computing/data-modeling-processing/geospatial-and-location-services/location-services.md) — Manages GPS availability and performs coordinate conversion between different mapping standards.

### Security & Cryptography

- [System Permission Managers](https://awesome-repositories.com/f/security-cryptography/system-permission-managers.md) — Simplifies the process of verifying and requesting runtime system permissions from the user. ([source](https://github.com/blankj/androidutilcode#readme))

### User Interface & Experience

- [Density-Independent Scaling](https://awesome-repositories.com/f/user-interface-experience/density-independent-scaling.md) — Calculates proportional screen dimensions by mapping fixed pixel values to device screen density.
- [Input Debouncing](https://awesome-repositories.com/f/user-interface-experience/interactive-ui-elements/outside-click-detectors/input-debouncing.md) — Implements UI helpers to filter rapid, repeated user inputs and prevent accidental duplicate click events. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/CHANGELOG.md))
- [Status Bar Controls](https://awesome-repositories.com/f/user-interface-experience/status-bar-controls.md) — Provides controls to adjust the visibility and transparency of system status and navigation bars. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/utilcode/README.md))
- [Status Bars](https://awesome-repositories.com/f/user-interface-experience/status-bars.md) — Enables customization of system bar colors and light/dark modes to match the application theme. ([source](https://github.com/Blankj/AndroidUtilCode/blob/master/lib/utilcode/README-CN.md))
- [System UI Customizations](https://awesome-repositories.com/f/user-interface-experience/system-ui-customizations.md) — Provides utilities to adjust system bars, scale screen dimensions, and implement custom notifications.
