How framework-res/receive_sharing_intent works
receive_sharing_intent is a Flutter plugin for handing shared text, URLs, images, videos, and files from other apps to a Flutter app. On Android, the plugin handles incoming intents, resolves shared URIs and emits media events. On iOS, a share extension processes attachments, optionally presents a compose UI, and saves results for the host app to retrieve. The platform plugins expose results through Flutter channels. Dart-side implementation was not sampled, so its connection to those channels is shown as unverified.
Main entry points: ReceiveSharingIntentPlugin.kt Intent handler · receive_sharing_intent_mobile.dart Media stream API · ReceiveSharingIntentPlugin.swift Host app plugin · RSIShareViewController.swift Share extension
Components 10
Android intake
- Intent handler
android/src/main/kotlin/com/kasem/receive_sharing_intent/ReceiveSharingIntentPlugin.kt - URI resolver
android/src/main/kotlin/com/kasem/receive_sharing_intent/FileDirectory.kt
iOS sharing
- Share extension
ios/receive_sharing_intent/Sources/receive_sharing_intent/RSIShareViewController.swift - Compose UI
ios/receive_sharing_intent/Sources/receive_sharing_intent/RSIComposeView.swift - Shared app-group data
- Host app plugin
ios/receive_sharing_intent/Sources/receive_sharing_intent/ReceiveSharingIntentPlugin.swift
Flutter API
- Flutter API
lib/receive_sharing_intent.dart - Shared media model
lib/src/data/shared_media_file.dart - Media stream API
lib/src/receive_sharing_intent_mobile.dart
Other components
- Sharing app
Connections 12
- Sharing app → Intent handler: shares intent
README.md - Intent handler → URI resolver: resolves URI
android/src/main/kotlin/com/kasem/receive_sharing_intent/ReceiveSharingIntentPlugin.kt - Intent handler → Media stream API: emits events
- Sharing app → Share extension: shares content
README.md - Share extension → Compose UI: presents UI
ios/receive_sharing_intent/Sources/receive_sharing_intent/RSIShareViewController.swift - Share extension → Shared app-group data: writes shared data
ios/receive_sharing_intent/Sources/receive_sharing_intent/RSIShareViewController.swift - Host app plugin → Shared app-group data: reads shared data
ios/receive_sharing_intent/Sources/receive_sharing_intent/ReceiveSharingIntentPlugin.swift - Host app plugin → Media stream API: emits events
- Intent handler → Flutter API: exposes channels
- Host app plugin → Flutter API: exposes channels
ios/receive_sharing_intent/Sources/receive_sharing_intent/ReceiveSharingIntentPlugin.swift - Flutter API → Media stream API: provides API
- Media stream API → Shared media model: uses model