android_background_task_manager 1.0.0
android_background_task_manager: ^1.0.0 copied to clipboard
A Flutter package for managing background tasks on Android using WorkManager and AlarmManager.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2024-01-01 #
Added #
- Initial release of Android Background Task Manager
- Support for scheduling one-time and periodic background tasks
- Task registration system with callback functions
- Comprehensive task options including constraints and retry logic
- Local persistence using SharedPreferences
- Native Android implementation using WorkManager and AlarmManager
- Comprehensive error handling with specific exception types
- Task execution monitoring and debugging support
- Complete example Flutter application
- Comprehensive unit test coverage
- Detailed documentation and README
Features #
- Task Management: Register, schedule, cancel, and monitor background tasks
- Flexible Scheduling: Support for one-time and periodic tasks with various constraints
- Reliable Execution: Uses Android WorkManager for reliable background execution
- Local Persistence: Tracks task state across app restarts
- Error Handling: Comprehensive error handling with descriptive exceptions
- Testing Support: Built-in support for testing and debugging
- Android Only: Optimized specifically for Android platform
Technical Details #
- Minimum Android API level 21
- Flutter 3.0.0+ support
- Uses WorkManager for periodic and reliable tasks
- Fallback to AlarmManager for simple one-time tasks
- Method channel communication between Flutter and native Android
- JSON serialization for task data
- Exponential backoff retry mechanism
Documentation #
- Complete API documentation
- Usage examples and best practices
- Error handling guide
- Testing guidelines
- Example Flutter application
Testing #
- Unit tests for all core functionality
- Mock method channel tests
- Task options validation tests
- Exception handling tests
- Integration tests for task execution
[Unreleased] #
Planned Features #
- iOS support using Background App Refresh
- Task dependency management
- Advanced scheduling patterns (cron-like)
- Task execution analytics
- Background task debugging tools
- Performance monitoring
- Task execution history
- Advanced retry strategies
- Task priority management