0

I am using the plugin to share photo and text, however, in the release version of the application sharing does not work.

When I'm using the debug version the sharing works perfectly.

Can someone help me?

void _shareImageAndText() async {
    try {
      var imageUrl = 'https://www.dropestore.com/img/07717000.jpg';
      var imageId = await ImageDownloader.downloadImage(imageUrl);
      var path = await ImageDownloader.findPath(imageId);
      var mimeType = await ImageDownloader.findMimeType(imageId);
      final ByteData bytes = await rootBundle.load(path);
      await WcFlutterShare.share(
          sharePopupTitle: 'share',
          subject: 'Title',
          text:
              'Body message',
          fileName: 'share.jpg',
          mimeType: mimeType,
          bytesOfFile: bytes.buffer.asUint8List());
    } catch (e) {
      print('error: $e');
    }
  }
  • pls share the link of the package you are using. – Loïc Fonkam Apr 08 '20 at 02:02
  • 2
    Maybe you haven't added internet permission for the Android Manifest File. If there is no internet permission, debug will be able to download, but not release version. See for how to add it: https://stackoverflow.com/a/2169311/10635364 – Zeynal Apr 08 '20 at 05:10

0 Answers0