Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingPluginException - No implementation found for method getInitialSharing on Android #63

Open
HEBOS opened this issue Nov 15, 2024 · 0 comments

Comments

@HEBOS
Copy link

HEBOS commented Nov 15, 2024

I'm getting "Unhandled Exception: MissingPluginException(No implementation found for method getInitialSharing on channel flutter_sharing_intent)".

That's is happening on Android (real device). Am I missing something?

I'm using version 1.1.1

Here is my code:

void initFilesStream(GlobalKey<NavigatorState> navigatorKey, FlutterSharingIntent sharingInstance) {
    _filesStreamSubscription = sharingInstance.getMediaStream().listen(
      (List<SharedFile> value) {
        _sharedFiles.addAll(value);
        _handleShare(navigatorKey);
      },
      onError: (err) {
        _handleShare(navigatorKey);
      },
    );

    sharingInstance.getInitialSharing().then((List<SharedFile> value) {
      _sharedFiles.addAll(value);
    });
  }

And here is what I added to the manifest:

<intent-filter>
      <action android:name="android.intent.action.VIEW" />
      <action android:name="android.intent.action.SEND" />
      <action android:name="android.intent.action.SEND_MULTIPLE" />
      <category android:name="android.intent.category.DEFAULT" />
      <data android:mimeType="text/csv" />
      <data android:mimeType="application/msword" />
      <data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document" />
      <data android:mimeType="application/json" />
      <data android:mimeType="application/x-rar-compressed" />
      <data android:mimeType="text/plain" />
      <data android:mimeType="application/vnd.ms-excel" />
      <data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
      <data android:mimeType="application/xml" />
      <data android:mimeType="application/zip" />
      <data android:mimeType="application/pdf" />
  </intent-filter>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant