receive_sharing_intent icon indicating copy to clipboard operation
receive_sharing_intent copied to clipboard

Separate shared text and opened links

Open thegrxp opened this issue 3 years ago • 3 comments

Based on the pull request of @MagTuxGit

Based on current version (no merge conflicts). Test updated. Example updated.

#63 #54 #22

Shared text and opened links are separated into different streams. It still hijacks all deep links, but now you can use this plugin for handling deep links as well (you can remove 'uni_links' from the project).

var textSharingSubscription = ReceiveSharingIntent.getTextStream().listen((value) {
  _handleSharing(text: value);
}, onError: (err) {
  log("getTextStream error: $err");
});
var uniLinkSubscription = ReceiveSharingIntent.getLinkStream().listen((value) {
  _handleUniLink(link: value);
}, onError: (err) {
  log("getLinkStream error: $err");
});

thegrxp avatar Nov 16 '20 16:11 thegrxp

this doesn't seem to be updated on pub yet. Is there a release date for an updated version?

thedejifab avatar Nov 18 '20 11:11 thedejifab

this doesn't seem to be updated on pub yet. Is there a release date for an updated version?

This is a pull request from a fork, it won't be on the pub version of the library until it's merged by the author of the library, if it's merged

EDIT: meanwhile if you want to test it you can do it by adding the fork to your pubspec.yaml

 receive_sharing_intent:
     git:
        url: git://github.com/thegrxp/receive_sharing_intent.git
        ref: master

thegrxp avatar Nov 18 '20 11:11 thegrxp

@thegrxp I closed my PR because this package can be used with uni_links without any problems now. I guess this PR can be closed as well.

MagTuxGit avatar Oct 30 '21 00:10 MagTuxGit