chore: upgrade Android examples to LeapSDK 0.9.7 with new model downloader#36
Merged
iamstuffed merged 5 commits intomainfrom Feb 5, 2026
Merged
chore: upgrade Android examples to LeapSDK 0.9.7 with new model downloader#36iamstuffed merged 5 commits intomainfrom
iamstuffed merged 5 commits intomainfrom
Conversation
d67e5b5 to
caba0b2
Compare
caba0b2 to
f4039ce
Compare
f4039ce to
9f942f0
Compare
…oader - Upgrade all Android examples from LeapSDK 0.9.6 to 0.9.7 - Migrate from deprecated LeapDownloader to new LeapModelDownloader API - Add leap-model-downloader dependency to all examples - Implement download progress tracking with real-time status updates - Add Android notification support during model downloads - Use singleton pattern for LeapModelDownloader to prevent concurrent download issues - Separate progress display logic (onEach) from flow control (takeWhile) - Update parameter names: modelSlug -> modelName, quantizationSlug -> quantizationType - Add POST_NOTIFICATIONS permission for Android 13+ - Update RecipeGenerator with enhanced download progress monitoring
9f942f0 to
4e0514c
Compare
Updated dependencies across all Android examples: - Kotlin: 2.3.0 → 2.3.10 - Compose BOM: 2025.12.01 → 2026.01.01 - activity-compose: 1.12.2 → 1.12.3 - kotlinx-serialization-json: 1.8.0 → 1.10.0 - jsoup: 1.16.1 → 1.22.1 - kaml: 0.85.0 → 0.104.0 Kept AGP at 8.13.2 (skipped 9.0.0 major version upgrade).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade Android Examples to LeapSDK 0.9.7
This PR upgrades all Android examples to LeapSDK 0.9.7 and adopts the Android-specific
LeapModelDownloaderAPI for enhanced download management with platform-native features.📦 Updated Examples
All 5 Android examples upgraded:
🆕 New Features
1. LeapModelDownloader - Android-Specific API
Migrated from KMP
LeapDownloaderto Android-specificLeapModelDownloader:LeapDownloaderis the Kotlin Multiplatform (KMP) API - works on all platformsLeapModelDownloaderis Android-specific and provides a superset of functionalityLeapDownloaderinternally while adding Android-native features:Before (KMP API):
After (Android API):
2. Download Progress Tracking 📊
Real-time download progress with Flow-based status updates:
3. Android System Notifications 🔔
Platform-native notifications during model downloads with custom per-app titles:
4. Singleton Pattern 🔒
Prevents concurrent download issues by reusing downloader instance:
5. Cleaner Flow Control 🎨
Separated concerns for better readability:
progressFlow .onEach { progress -> /* display logic */ } .takeWhile { progress -> /* control logic */ } .collect()🔄 API Changes
Updated Dependencies
Parameter Renames
More semantic and consistent:
quantizationSlug→quantizationTypePermissions Added
📊 Statistics
✨ Benefits
💡 Why LeapModelDownloader?
While
LeapDownloader(KMP) works perfectly on Android,LeapModelDownloaderprovides:LeapDownloaderinternally as the foundationBoth APIs remain available - use
LeapDownloaderfor KMP projects,LeapModelDownloaderfor Android-specific apps that want enhanced features.📝 Documentation
🔄 Dependency Updates
All Android examples updated to latest stable versions:
Kept AGP at 8.13.2 (skipped 9.0.0 major version to avoid breaking changes).
🧪 Testing
All examples tested with:
🔗 Related
leap-model-downloaderartifact from Maven CentralLeapDownloaderfor multiplatform projects