Overview
The media_scanner package is a Flutter plugin designed to scan and refresh newly added media files in the Android gallery. It enables apps to notify the system's media store about new images or videos, ensuring they appear promptly in the device's gallery app. This is particularly useful after capturing or downloading media within an app. The package works exclusively on Android and integrates with the platform's MediaStore API to trigger a rescan of the storage directory. It simplifies the process of making media visible without requiring manual user intervention.
Use cases
- Refreshing gallery after image capture
- Automatically scanning downloaded media
- Ensuring media appears in gallery immediately
- Integrating with file-saving workflows
- Supporting photo/video sharing features
Key features
- Android-only compatibility
- Simple API for triggering media scan
- Integration with Android MediaStore
- Automatic gallery refresh
- Lightweight and minimal dependencies
Suitable for
- Apps that generate or download media
- Image or video capture tools
- File management utilities
- Gallery-integrated applications
- Android-focused multimedia apps
Considerations
- Only works on Android devices
- Requires appropriate storage permissions
- May require background execution handling
- Limited to media file types supported by MediaStore
- Does not work on iOS platforms