[Feature] Add Live Photo Support for Cross-Platform Transfer #2488
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.
[Feature] Add Live Photo Support for Cross-Platform Transfer
🎯 Overview
This PR implements Live Photo support for LocalSend, enabling the preservation of Apple's Live Photos when transferring files to iOS devices. Live Photos capture not just a moment, but the moments just before and after, bringing memories to life with movement and sound - making them far more vivid and emotionally engaging than static images.
💡 Why Live Photos Matter
Live Photos represent a revolutionary way to capture and preserve memories. Unlike traditional static photos, Live Photos:
By supporting Live Photo transfer, LocalSend ensures that these precious, dynamic memories are preserved when sharing between devices, rather than being reduced to static images.
📋 Summary
🔧 Key Changes
Core Architecture
app/lib/provider/live_photo_provider.dart
- Device capability detectionapp/lib/provider/cache/live_photo_cache_provider.dart
- Intelligent file pairing with timeout managementapp/lib/util/native/live_photo_helper.dart
- iOS native method callsiOS Implementation
File Pairing Logic
The system uses filename-based matching to identify Live Photo pairs:
Example:
IMG_1234.HEIC
+IMG_1234.MOV
→ Combined into Live PhotoUI/UX Enhancements
🚀 How to Test
Prerequisites
Test Scenarios
Live Photo Reception:
UI Adaptation:
Settings Persistence:
Fallback Behavior:
📱 Platform Support
Current Limitation: This initial implementation focuses on receiving Live Photos on iOS devices. Sending Live Photos from iOS and Android support are planned for future releases.
🎬 Demo Materials
Screenshots
Demo Gif
🔄 How to Extend
Supporting Android Platforms
To add Android Live Photo support, developers need to:
Research Android Live Photo Formats: Different manufacturers use different formats (Samsung Motion Photos, Google Motion Photos, etc.)
Implement Android Native Code: Add Live Photo saving capabilities in the Android MainActivity.kt
Update Device Detection Logic: Extend the capability detection to include Android devices
Add Method Channel Handlers: Implement Android-specific method channels for Live Photo operations
Test Across Devices: Validate functionality across different Android manufacturers and versions
The existing architecture with
LivePhotoHelper
andLivePhotoCacheProvider
is designed to be extensible and will automatically support Android once the native implementation is added.Current Constraints
Device Compatibility
Outstanding Issues
🔮 Future Roadmap
Planned Enhancements
📦 Attachments
🔗 Related Issues
Note: This is the first phase of Live Photo support, focusing on iOS reception capabilities. The implementation follows LocalSend's architecture patterns and maintains backward compatibility while laying the foundation for comprehensive Live Photo support across all platforms.