listen_sharing_intent
1.9.2, released 2 years ago by ilya.zverev.info
Flutter plugin to receive shared photos, videos, text, URLs, or files from other apps.
What it does
It listens for share intents on Android and iOS, exposing the received media as a stream and initial payload. It supports a wide range of MIME types and can be configured to auto‑redirect to the host app.
AI-written summary of version 1.9.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- Implementing a share extension to accept content from other apps
- Handling incoming files or URLs in a Flutter app
- Building a photo or document sharing feature
Skip it when
- You only need to share content from your app
- You are targeting a single platform without native intent handling
Strengths
- Supports Android and iOS with extensive MIME type coverage
- Provides both initial payload and continuous stream of shared items
- Allows disabling auto‑redirect for custom flow
Weaknesses
- Requires native configuration in AndroidManifest and iOS Share Extension
- Setup is more involved than simple plugins
- Documentation is limited to README and changelog
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Add intent filters to AndroidManifest.xml, request READ_EXTERNAL_STORAGE permission, create an iOS Share Extension, configure Info.plist, and set AppGroupId.
```dart
import 'package:listen_sharing_intent/listen_sharing_intent.dart';
void main() async {
final initial = await ReceiveSharingIntent.instance.getInitialMedia();
ReceiveSharingIntent.instance.mediaStream.listen((media) {
// handle new shared items
});
}
```Alternatives
Packages that do the same job and could replace listen_sharing_intent.
- receive_sharing_intent
Original plugin providing the same functionality; this fork adds extra PRs and fixes.
83Compare
Works with
Packages commonly used together with listen_sharing_intent: ones it builds on, ones built on it, and its own family.