media_manager 1.0.0
media_manager: ^1.0.0 copied to clipboard
A Flutter plugin for managing media files on Android, iOS, and macOS with enhanced performance and latest OS compatibility.
1.0.0 #
BREAKING CHANGE — API redesign to match the new Android engine
Dart (lib) #
MediaManagerfacade fully rewritten — all oldgetAllImages/Videos/Audio/Documents/ZipFilesmethods removed- New paginated API:
getMediaPage(type, extensions, page, pageSize)— pagination at SQLite/PHFetchOptions level, never loads the full library - New
getMediaCount(type, extensions)for computing total pages before the first query - New
getThumbnail(uriOrPath, width, height, dateModified, kind)— returns an on-disk JPEG path instead of raw bytes; eliminates large byte-array transfers over the method channel - New
clearThumbnailCache()replacesclearImageCache() - New
hasStoragePermission()— check without prompting - New
openAllFilesAccessSettings()— direct link to Android MANAGE_ALL_FILES page getDirectories()return type changed toList<Map<String, String>>getDirectoryContents()now accepts named parameterspath,page,pageSizeMediaItemmodel updated: addedmediaType(int),constconstructor, fullfromMapwith null-safe coercionsMediaTypeenum doc-commentedisolate_worker.dartreplaced with a lightweightparseMediaItems()helper usingIsolate.run— platform calls from secondary isolates removed (was broken by design)
Android #
ThumbnailEngine: disk-backed JPEG cache (mm_thumbs/), MD5 cache key,Semaphore(4), LRU trim at 96 MB,Bitmap.recycle()after write, returns absolute pathMediaStoreScanner: real SQLLIMIT/OFFSETpagination viaBundleon API 30+ and legacy sort string on olderMediaManagerPlugin:SafeResultwrapper prevents "Reply already submitted" crashes;SupervisorJob+Dispatchers.IOcoroutine scope;hasStoragePermission,openAllFilesAccessSettingsadded; all oldgetAllXmethod-channel calls removed
iOS #
ThumbnailUtil.swiftremoved — replaced byThumbnailEngine.swiftThumbnailEngine: same disk-cache design as Android (mm_thumbs/, MD5, semaphore, LRU trim), usesUIGraphicsImageRendererfor scale-down decode,ph://PHAsset URI resolution, album-art viaAVAsset.commonMetadataMediaManagerPlugin:SafeResultadded;getMediaPage/getMediaCountusePHFetchOptionswith sort + index-range enumeration;hasStoragePermissionusesPHAuthorizationStatus;getDirectoryContentspaginated; Kingfisher dependency removed
macOS #
-
ThumbnailUtil.swiftremoved — replaced byThumbnailEngine.swift -
ThumbnailEngine: same disk-cache design; usesNSImage+NSBitmapImageRepfor JPEG output;AVAssetImageGeneratorfor video frames; no Kingfisher -
MediaManagerPlugin:SafeResultadded;getMediaPage/getMediaCountuse recursive file-system walk (max depth 8) with extension filtering;getDirectoriesreturns well-known home subdirectories;requestStoragePermissionusesNSOpenPanel; Kingfisher dependency removed -
Fix bug kotlin (AGP)
0.1.2 #
- Fix bug gradle.
- Remove debug logging from MediaManagerPlugin
0.1.1 #
- Fix README for use Performance Management & Isolate Usage
0.1.0 #
- MAJOR PERFORMANCE IMPROVEMENTS: Complete optimization overhaul based on photo_manager techniques
- Android: Integrate Glide library for superior image loading, caching, and processing
- Android: Replace simple ExecutorService with optimized ThreadPoolExecutor (3-5 threads with 60s keep-alive)
- Android: Implement advanced caching system with 1/8 memory allocation (similar to photo_manager)
- Android: Add dedicated ThumbnailUtil class for better code organization and maintainability
- Android: Optimize image preview generation with Glide's centerCrop and disk caching
- Android: Enhance video thumbnail extraction using Glide's frame extraction capabilities
- Android: Improve permission handling with proper RequestPermissionsResultListener implementation
- Android: Better resource management and cleanup in plugin lifecycle
- Performance: Significant speed improvements for image and video loading operations
- Code Quality: Refactor thumbnail generation logic into separate utility class following Single Responsibility Principle
0.0.9 #
- Fix: Optimize JVM memory allocation to resolve Kotlin daemon startup issues
- Android: Keep default heap size at 2G for optimal performance
- Android: Lower MetaspaceSize and ReservedCodeCacheSize for improved performance on low-memory systems
- Build: Add gradle.properties to main plugin directory for consistent JVM settings
0.0.8 #
- Android: Replace deprecated video thumbnail API with modern createVideoThumbnail(File, Size) on API 29+ and fallback for older versions
- Lower default Gradle JVM memory for better compatibility
- Docs: Update README usage version, minor cleanup
0.0.7 #
- Fix bug gradle.
0.0.6 #
- Edit pub point.
- Edit readme.
0.0.5 #
- Enhanced OS compatibility - Support for Android 16 (API 36), iOS 18, and macOS 15 (Sequoia)
- Improved memory management and battery optimization for Android
- Enhanced permissions handling for latest Android versions
- Added comprehensive documentation with platform-specific setup guides
- Fixed compilation errors and memory leaks
- Added feature parity across all platforms
- Improved error handling and logging
0.0.4 #
- Add New Feature thumbnail/preview.
0.0.3 #
- Fix bug iOS && MacOS.
0.0.2 #
- Fix pub point.
0.0.1 #
- Initial release.