Skip to content

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

@HEBOS

Description

@HEBOS

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions