Coder Social home page Coder Social logo

shekarmudaliyar / social_share Goto Github PK

View Code? Open in Web Editor NEW
108.0 4.0 175.0 13.73 MB

Flutter package to share images/videos/text on social media

Home Page: https://pub.dev/packages/social_share

License: MIT License

Kotlin 27.27% Ruby 4.04% Objective-C 28.06% Dart 40.28% HTML 0.35%

social_share's Introduction

social_share

Wide variety of sharing options you'll need to share directly to certain popular apps or just share with default native share.

Introduction

Works on both platforms Android and iOS

It provides you with most of the popular sharing options With this plugin you can share on instagram stories and facebook stories and also copy to clipboard

Usage

Android Configuration

Paste the following attribute in the manifest tag in the android/app/src/main/AndroidManifest.xml:

 		`xmlns:tools="http://schemas.android.com/tools"`
For example:
        <manifest xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:tools="http://schemas.android.com/tools"
                package="your package...">

Add this piece of code in the manifest/application in the android/app/src/main/AndroidManifest.xml:

 		<provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.com.shekarmudaliyar.social_share"
            android:exported="false"
            android:grantUriPermissions="true"
            tools:replace="android:authorities">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/filepaths" />
        </provider>

Create a xml file named filepaths.xml in the app/src/main/res/xml folder and paste this code in the file :

<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <cache-path name="image" path="/"/>
</paths>

iOS Configuration

Add this to your Info.plist to use share on instagram and facebook story

<key>LSApplicationQueriesSchemes</key>
	<array>
	<string>instagram-stories</string>
	<string>facebook-stories</string>
	<string>facebook</string>
	<string>instagram</string>
	<string>twitter</string>
	<string>whatsapp</string>
    <string>tg</string>
	</array>

Add this if you are using share on facebook. For this you have to create an app on https://developers.facebook.com/ and get the App ID

<key>FacebookAppID</key>
<string>xxxxxxxxxxxxxxx</string>

shareInstagramStory

SocialShare.shareInstagramStory(imageFile.path, "#ffffff",
                              "#000000", "https://deep-link-url");

shareInstagramStorywithBackground

 SocialShare.shareInstagramStorywithBackground(image.path, "https://deep-link-url",
                              backgroundImagePath: backgroundimage.path);

shareFacebookStory

For iOS

SocialShare.shareFacebookStory(image.path,"#ffffff","#000000",
                              "https://deep-link-url","facebook-app-id");

For Android appID is mandatory if using shareFacebookStory or else it wont work

SocialShare.shareFacebookStory(image.path,"#ffffff","#000000",
                              "https://deep-link-url","facebook-app-id",
							  appId: "xxxxxxxxxxxxx");

copyToClipboard

SocialShare.copyToClipboard("This is Social Share plugin");

shareTwitter

//without hashtags
SocialShare.shareTwitter("This is Social Share plugin");

//with hashtags
SocialShare.shareTwitter(
                              "This is Social Share twitter example",
                              hashtags: ["hello", "world", "foo", "bar"]);

//with hashtags and link
SocialShare.shareTwitter(
                              "This is Social Share twitter example",
                              hashtags: ["hello", "world", "foo", "bar"],url:"https://your-url-here/");

shareSms

//without url link in message
SocialShare.shareSms("This is Social Share Sms example");

//with url link in message
SocialShare.shareSms("This is Social Share Sms example",url: "https://your-url-here/");

shareWhatsapp

SocialShare.shareWhatsapp("Hello World");

shareTelegram

SocialShare.shareTelegram("Hello World");

shareOptions

This will open the default native share options

//without an image
SocialShare.shareOptions("Hello world");

//with an image
SocialShare.shareOptions("Hello world",imagePath: image.path);

checkInstalledAppsForShare

SocialShare.checkInstalledAppsForShare();

Here's few demo!

Story share on Instagram

insta story share demo

Story share on Facebook

fb story share demo

Copy to Clipboard

copy demo

Known issues

On Android 6, Share to Instagram Stories may not open Instagram app or load the specified image.

Buy me a ☕ !!

((More coffee == more code) == faster updates)

Donate

social_share's People

Contributors

codiyampa avatar dpacchi avatar grburst avatar guilhermeagostinelli avatar imsaharukh avatar jerazo7 avatar jkronlachner avatar mikaelim-id avatar nwalker1208 avatar otopba avatar shekarmudaliyar avatar vhcblade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

social_share's Issues

Unable to share with background in Instagram Stories

Hi ! @ShekarMudaliyar

First of all, thank you for this plugin :)

I tried to use the function to share in Instagram Stories with background but it doesn't works and I don't know what happens.

Here is my code:

          SocialShare.shareInstagramStorywithBackground(
            file.path,
            "#${bgColor.value.toRadixString(16).substring(2,8)}",
            "#${bgColor.value.toRadixString(16).substring(2,8)}",
            "https://deep-link-url",
            backgroundImagePath: 'bg/bg-1.png'
          );

I tried to handle it as a File using this solution but gives me an error too...

          File bg = await getImageFileFromAssets('bg/bg-1.png');
          SocialShare.shareInstagramStorywithBackground(
            file.path,
            "#${bgColor.value.toRadixString(16).substring(2,8)}",
            "#${bgColor.value.toRadixString(16).substring(2,8)}",
            "https://deep-link-url",
            backgroundImagePath: bg.path
          );

Captura de pantalla 2020-04-29 a las 21 24 19

I also would want to ask what is the use of the URL parameter ('https://deep-link-url' in the example) :)

Thank you !

Error about shareOptions

E/MethodChannel#social_share(16149): Failed to handle method call
E/MethodChannel#social_share(16149): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SEND flg=0x1 clip={null T:Hello world} (has extras) }
E/MethodChannel#social_share(16149): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1809)
E/MethodChannel#social_share(16149): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1523)
E/MethodChannel#social_share(16149): at android.app.Activity.startActivityForResult(Activity.java:4225)
E/MethodChannel#social_share(16149): at android.app.Activity.startActivityForResult(Activity.java:4183)
E/MethodChannel#social_share(16149): at android.app.Activity.startActivity(Activity.java:4522)
E/MethodChannel#social_share(16149): at android.app.Activity.startActivity(Activity.java:4490)
E/MethodChannel#social_share(16149): at com.shekarmudaliyar.social_share.SocialSharePlugin.onMethodCall(SocialSharePlugin.kt:116)
E/MethodChannel#social_share(16149): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231)
E/MethodChannel#social_share(16149): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93)
E/MethodChannel#social_share(16149): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642)
E/MethodChannel#social_share(16149): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#social_share(16149): at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#social_share(16149): at android.os.Looper.loop(Looper.java:136)
E/MethodChannel#social_share(16149): at android.app.ActivityThread.main(ActivityThread.java:6119)
E/MethodChannel#social_share(16149): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#social_share(16149): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
E/MethodChannel#social_share(16149): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
E/flutter (16149): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, No Activity found to handle Intent { act=android.intent.action.SEND flg=0x1 clip={null T:Hello world} (has extras) }, null)

breaking changes

you made breaking changes to functions by making some parameters named and you didn't update readme to show these changes

you didn't bump up the major version, thus pub cannot detect a breaking change - edit: this is not ture, i don't know how i got myself into this, when i was building on windows, there were no problems, but on mac it decided to get version 2.1.1, whilst i have ^2.0.5 in the pubspec. crazy and looks like a bug in pub

Unable to share text with shareOptions

Hi!

When I tried to share a text message on my Android phone (Redmi 6, Android 8.1) I caught the following error:

E/MethodChannel#social_share( 8354): Failed to handle method call
E/MethodChannel#social_share( 8354): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.SEND flg=0x1 clip={null T:1qEfOimGcVx2ezjL2Ea8} (has extras) }
E/MethodChannel#social_share( 8354): 	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1945)
E/MethodChannel#social_share( 8354): 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1620)
E/MethodChannel#social_share( 8354): 	at android.app.Activity.startActivityForResult(Activity.java:4541)
E/MethodChannel#social_share( 8354): 	at android.app.Activity.startActivityForResult(Activity.java:4499)
E/MethodChannel#social_share( 8354): 	at android.app.Activity.startActivity(Activity.java:4860)
E/MethodChannel#social_share( 8354): 	at android.app.Activity.startActivity(Activity.java:4828)
E/MethodChannel#social_share( 8354): 	at com.shekarmudaliyar.social_share.SocialSharePlugin.onMethodCall(SocialSharePlugin.kt:116)
E/MethodChannel#social_share( 8354): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:231)
E/MethodChannel#social_share( 8354): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:93)
E/MethodChannel#social_share( 8354): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:642)
E/MethodChannel#social_share( 8354): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#social_share( 8354): 	at android.os.MessageQueue.next(MessageQueue.java:331)
E/MethodChannel#social_share( 8354): 	at android.os.Looper.loop(Looper.java:149)
E/MethodChannel#social_share( 8354): 	at android.app.ActivityThread.main(ActivityThread.java:6662)
E/MethodChannel#social_share( 8354): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#social_share( 8354): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/MethodChannel#social_share( 8354): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
E/flutter ( 8354): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, No Activity found to handle Intent { act=android.intent.action.SEND flg=0x1 clip={null T:1qEfOimGcVx2ezjL2Ea8} (has extras) }, null)
E/flutter ( 8354): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter ( 8354): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
E/flutter ( 8354): <asynchronous suspension>
E/flutter ( 8354): #2      SocialShare.shareOptions (package:social_share/social_share.dart:217:41)
E/flutter ( 8354): #3      _buildScaffold.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:circles_app/presentation/keys/keys_screen.dart:45:35)
E/flutter ( 8354): #4      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14)
E/flutter ( 8354): #5      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:789:36)
E/flutter ( 8354): #6      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
E/flutter ( 8354): #7      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
E/flutter ( 8354): #8      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
E/flutter ( 8354): #9      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:236:7)
E/flutter ( 8354): #10     GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
E/flutter ( 8354): #11     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
E/flutter ( 8354): #12     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
E/flutter ( 8354): #13     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
E/flutter ( 8354): #14     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
E/flutter ( 8354): #15     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
E/flutter ( 8354): #16     _rootRunUnary (dart:async/zone.dart:1138:13)
E/flutter ( 8354): #17     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
E/flutter ( 8354): #18     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
E/flutter ( 8354): #19     _invoke1 (dart:ui/hooks.dart:273:10)
E/flutter ( 8354): #20     _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5)
E/flutter ( 8354): 

I checked how sharing is realized in another library - share. They explicitly add text/plain type to Intent. link to the line of code

I think a possible solution is to manually assign the type if the image is null, like so:
SocialSharePlugin.kt

          if(image!=null){
              //check if  image is also provided
              val imagefile =  File(registrar.activeContext().cacheDir,image)
              val imageFileUri = FileProvider.getUriForFile(registrar.activeContext(), registrar.activeContext().applicationContext.packageName + ".com.shekarmudaliyar.social_share", imagefile)
              intent.type = "image/*"
              intent.putExtra(Intent.EXTRA_STREAM,imageFileUri)
          } else {
              intent.type = "text/plain";
          }

Or we may assign "text/plain" type by default and change it if image != null.

@ShekarMudaliyar What do you think about this fix? Should I open PR?

Share images to WhatsApp

Currently, WhatsApp supports sharing Image along with text via Intent, for Android (not sure of iOS). Would be great if we could add this option to the current WhatsApp sharing options.

Black background on iOS when shareInstagramStorywithBackground

Hi !

I have this piece of code for share an image with background through IG Stories.

File tweetImg = await widget.tweetScreenshotController.capture(pixelRatio: 5);
File bgImg = await widget.bgScreenshotController.capture(pixelRatio: 5);

SocialShare.shareInstagramStorywithBackground(
   tweetImg.path,
   "#${tweetSettings.bgColor.value.toRadixString(16).substring(2,8)}",
   "#${tweetSettings.bgColor.value.toRadixString(16).substring(2,8)}",
   "https://deep-link-url",
   backgroundImagePath: bgImg.path
);

Everything worked fine but since few days the image shares with a black background only in iOS ...
Thank you !

UPDATE
I think that there are some changes in the official documentation that can affect to the plugin @ShekarMudaliyar I really would like to fix it with a PR but I don't have the necessary knowledge T.T

https://developers.facebook.com/docs/instagram/sharing-to-stories#overview

Error in the provider, to the to share image in more options

This error is printed when sharing the image in other options, but the sharing is working normally. However the image of the sharing popup does not appear and this error is demonstrated.

E/DatabaseUtils(28615): Writing exception to parcel
E/DatabaseUtils(28615): java.lang.SecurityException: Permission Denial: reading com.example.mobile_app.FlutterSocialSharePluginFileProvider uri content://com.po.po_mobile_app.com.shekarmudaliyar.social_share/image/stickerAsset.png from pid=29565, uid=1000 requires the provider be exported, or grantUriPermission()
E/DatabaseUtils(28615): 	at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:740)
E/DatabaseUtils(28615): 	at android.content.ContentProvider.semEnforceReadPermission(ContentProvider.java:659)
E/DatabaseUtils(28615): 	at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:602)
E/DatabaseUtils(28615): 	at android.content.ContentProvider$Transport.enforceFilePermission(ContentProvider.java:593)
E/DatabaseUtils(28615): 	at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:507)
E/DatabaseUtils(28615): 	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:307)
E/DatabaseUtils(28615): 	at android.os.Binder.execTransactInternal(Binder.java:1056)
> flutter doctor
[✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale
    en-BR)
    • Flutter version 1.22.5 at
      /Users/giovannidelimaconceicao/development/flutter
    • Framework revision 7891006299 (10 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/giovannidelimaconceicao/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.10.1

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.53.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.19.0

[✓] Connected device (1 available)
    • SM J810M (mobile) • 0faf9799 • android-arm • Android 10 (API 29)

Share to Twitter on iOS does not work

Hi. Sharing to Twitter on iOS does not seem to work. Nothing happens. The same call works correctly on Android.

SocialShare.shareTwitter(text, url: url)

What may be the cause? I have the Twitter added in the url schemes.

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>twitter</string>
</array>

I am using version 2.0.6.

Invalid Constant Value

I am trying to add a "Share to Twitter" button using the Slidable package. But when I try to use the ShareTwitter function all I get is an "Invalid constant Value" error regardless of what I pass through.

image

shareToTwitterLink function always returns canceled

When onActivityResult in called on Android, it always returns resultCode == RESULT_CANCELED if even the tweet was successful. Do you maybe have any idea what could be wrong and if so, how to fix it?

If you don't have time to update code yourself, I can do the fix myself and pull request.

App crashes when trying to share to Instagram Stories

Sharing to instagram stories works (the image and the background are fully loaded and I can proceed to sharing an Instagram story) but the app crashes without any exceptions or stack traces right after Instagram is opened.

Only

Lost connection to device.
Exited (sigterm)

is printed to the console. The app then immediately seems to re-launch itself and keeps stuck at the splash screen indefinitely.

I'm using the latest version of social_share, which is currently 2.0.5

The error happens both on the emulator and on my real device (Motorola One Hyper).

flutter doctor -v

[✓] Flutter (Channel stable, 1.22.6, on Linux, locale en_US.UTF-8)
    • Flutter version 1.22.6 at /home/guilherme/Downloads/flutter
    • Framework revision 9b2d32b605 (3 weeks ago), 2021-01-22 14:36:39 -0800
    • Engine revision 2f0af37152
    • Dart version 2.10.5

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/guilherme/Android/Sdk
    • Platform android-29, build-tools 29.0.2
    • ANDROID_SDK_ROOT = /home/guilherme/Android/Sdk
    • Java binary at: /home/guilherme/Downloads/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Android Studio (version 3.5)
    • Android Studio at /home/guilherme/Downloads/android-studio
    • Flutter plugin version 44.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.53.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.19.0

[✓] Connected device (2 available)
    • motorola one hyper (mobile)        • 0066348421    • android-arm64 • Android 10 (API 29)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86   • Android 10 (API 29) (emulator)

• No issues found!

Related issue: flutter/flutter#75935

Error on android build

Hello,
I got this error when build android
What went wrong:
Execution failed for task ':app:mergeDebugResources'.

/android/app/src/main/res/values/filepaths.xml: Resource and asset merger: Can't determine type for tag ''

It seems that the folder of the file must necessarily be xml

Unable to use shareOptions with iPad

Hi!
I think an iPad isn't the main device, but it's the only iOS device that I have.

I caught the following error on my iPad

2020-04-26 18:55:14.319236+0300 MYAPP[4286:2793126] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'UIPopoverPresentationController (<UIPopoverPresentationController: 0x12fb5d060>) should have a non-nil sourceView or barButtonItem set before the presentation occurs.'
*** First throw call stack:
(0x1a13b4a48 0x1a10dbfa4 0x1a4d3ad9c 0x1a4d44ff4 0x1a4d42b38 0x1a5443c84 0x1a54337d4 0x1a5463744 0x1a1331e68 0x1a132cd54 0x1a132d320 0x1a132cadc 0x1ab2cd328 0x1a543a63c 0x104658080 0x1a11b6360)
libc++abi.dylib: terminating with uncaught exception of type NSException

I checked (StackOverflow, jessicauelmen blog) that this problem is relevant only on iPads.

I don't know Objective C at all :( , but I have tried to fix this.
I found that possible solution is adding the following strings to SocialSharePlugin.m. One to if branch with image and one to the branch without image:

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
    activityVC.popoverPresentationController.sourceView = controller.view;
    activityVC.popoverPresentationController.sourceRect=CGRectMake( 0,200,768,20);
}

(I have no idea what numbers in CGRectMake mean, but it works. I copied them from somewhere)

What do you think about this fix?

Crash iOS shareFacebookStory when impagePath is wrong

Hi all,

I experience a crash on iOS when the image path is wrong when trying to share on Facebook:
** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
terminating with uncaught exception of type NSException

Crash is in file SocialSharePlugin.m line 106.

Could you please catch the error and prevent a full app crash?
Let me know if you need more info to reproduce.
Thanks!

Cannot share image to whatsapp from shareOptions

When calling SocialShare.shareOptions('some text', imagePath: imagePath); and choosing WhatsApp, only 'some text' is sent, not the image. This is working perfectly on Telegram, Instagram, Mail, etc.

Couldn't try it with Android, I tested this with iOS.

Share to Instagram Stories does not work

Instagram Stories is opened with a black screen (no image).

It happens when loading a network image:

var response = await get("https://images.pexels.com/photos/414171/pexels-photo-414171.jpeg");
Directory tempDir = await getTemporaryDirectory();
File file = File('${tempDir.path}/test.jpg');
File createdFile = await file.create(recursive: true);
if (await createdFile.exists())
    file.writeAsBytesSync(response.bodyBytes);
SocialShare.shareInstagramStory(file.path, "#ffffff", "#000000", "https://deep-link-url");

And also when selecting an image through ImagePicker:

File file = await ImagePicker.pickImage(source: ImageSource.gallery);
SocialShare.shareInstagramStory(file.path, "#ffffff", "#000000", "https://deep-link-url");

Instagram Stories Problem

shareTwitter without URL results in error

Seems like a null-safety error.
I think in social_share.dart you would have to change the code:

if (Platform.isAndroid) {
      modifiedUrl = Uri.parse(url!).toString().replaceAll('#', "%23");
    } else {
      modifiedUrl = Uri.parse(url!).toString();
    }

to

if (Platform.isAndroid) {
      modifiedUrl = Uri.parse(url?).toString().replaceAll('#', "%23");
    } else {
      modifiedUrl = Uri.parse(url?).toString();
    }

Otherwise you promise (= !) a URL that might not be given. So better replace the exclamation mark with question mark or check if URL is not null before running the parse part.

Multiple images

Is it possible to share multiple images? If so how to achieve that cheers

Android support

Issue to track Android plugin support. We're really interested in using this plugin but being iOS-only is a blocker for us.

Error about manifest

What went wrong:
Execution failed for task ':app:generateDebugBuildConfig'.
org.xml.sax.SAXParseException; systemId: file:/Users/cagrialtay/Desktop/ideaProjects/acununparasiniharca/android/app/src/main/AndroidManifest.xml; lineNumber: 51; columnNumber: 53; The prefix "tools" for attribute "tools:replace" associated with an element type "provider" is not bound.

Can't share both text and image in SocialShare.shareOptions for Facebook or Instagram

When sharing to Facebook or Instagram from SocialShare.shareOptions I can post either the text or the image on their own but not both together. Though things work as expected with Twitter, WhatsApp, Telegram and Gmail when I try to post both on Facebook or Instagram whether it be to Messenger, SMS, Direct Message or the Timeline only the image appears.

onPressed: () async {
await _screenshotController.capture().then((image) async {
SocialShare.shareOptions('So look at this! ', imagePath: image.path);
});

shareSMS is not working on iOS

Im trying this package on iOS 14 and Android to share a SMS, but nothings happens, and this returns from iOS : cannot find Sms app.
I have Message app installed.

Android stack :

E/flutter (21010): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Null check operator used on a null value
E/flutter (21010): #0 SocialShare.shareSms
package:social_share/social_share.dart:148
E/flutter (21010): #1 _SharePageState.build.
package:believe/…/pages/share_page.dart:372
E/flutter (21010): #2 _SharePageState.build.
package:believe/…/pages/share_page.dart:369
E/flutter (21010): #3 _InkResponseState._handleTap
package:flutter/…/material/ink_well.dart:991
E/flutter (21010): #4 GestureRecognizer.invokeCallback
package:flutter/…/gestures/recognizer.dart:182
E/flutter (21010): #5 TapGestureRecognizer.handleTapUp
package:flutter/…/gestures/tap.dart:607
E/flutter (21010): #6 BaseTapGestureRecognizer._checkUp
package:flutter/…/gestures/tap.dart:296
E/flutter (21010): #7 BaseTapGestureRecognizer.handlePrimaryPointer
package:flutter/…/gestures/tap.dart:230
E/flutter (21010): #8 PrimaryPointerGestureRecognizer.handleEvent
package:flutter/…/gestures/recognizer.dart:475
E/flutter (21010): #9 PointerRouter._dispatch
package:flutter/…/gestures/pointer_router.dart:93
E/flutter (21010): #10 PointerRouter._dispatchEventToRoutes.
package:flutter/…/gestures/pointer_router.dart:138
E/flutter (21010): #11 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:397:8)
E/flutter (21010): #12 PointerRouter._dispatchEventToRoutes
package:flutter/…/gestures/pointer_router.dart:136
E/flutter (21010): #13 PointerRouter.route
package:flutter/…/gestures/pointer_router.dart:122
E/flutter (21010): #14 GestureBinding.handleEvent
package:flutter/…/gestures/binding.dart:381
E/flutter (21010): #15 GestureBinding.dispatchEvent
package:flutter/…/gestures/binding.dart:361
E/flutter (21010): #16 RendererBinding.dispatchEvent
package:flutter/…/rendering/binding.dart:278
E/flutter (21010): #17 GestureBinding._handlePointerEventImmediately
package:flutter/…/gestures/binding.dart:316
E/flutter (21010): #18 GestureBinding.handlePointerEvent
package:flutter/…/gestures/binding.dart:280
E/flutter (21010): #19 GestureBinding._flushPointerEventQueue
package:flutter/…/gestures/binding.dart:238
E/flutter (21010): #20 GestureBinding._handlePointerDataPacket
package:flutter/…/gestures/binding.dart:221
E/flutter (21010): #21 _rootRunUnary (dart:async/zone.dart:1370:13)
E/flutter (21010): #22 _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (21010): #23 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (21010): #24 _invoke1 (dart:ui/hooks.dart:180:10)
E/flutter (21010): #25 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:276:7)
E/flutter (21010): #26 _dispatchPointerDataPacket (dart:ui/hooks.dart:96:31)
E/flutter (21010):

iOS bug rotating portrait image to landscape in Instagram story

Hi I am trying to share an image to instagram story. The image is definitely in portrait mode but for some reason inside Instagram the image is rotated by 90 degrees. If it was a landscape image.
It is important to know that if I take a landscape image it is shared correctly. This one is not rotated or something else.

Issue on IOS device since 23Feb 2021

Xcode's output:

1 warning generated.
/Users/apple/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/social_share-2.0.5/ios/Classes/SocialSharePlugin.m:136:45: warning: 'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid. [-Wdeprecated-declarations]
NSString* urlTextEscaped = [urlstring stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
^
In module 'UIKit' imported from /Users/apple/AndroidStudioProjects/flutter_app_like4like/ios/Pods/Target Support Files/social_share/social_share-prefix.pch:2:
In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:595:1: note: 'stringByAddingPercentEscapesUsingEncoding:' has been explicitly marked deprecated here
- (nullable NSString )stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc API_DEPRECATED("Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.", macos(10.0,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));
^
/Users/apple/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/social_share-2.0.5/ios/Classes/SocialSharePlugin.m:195:47: warning: 'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid. [-Wdeprecated-declarations]
NSString
urlTextEscaped = [urlstring stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
^
In module 'UIKit' imported from /Users/apple/AndroidStudioProjects/flutter_app_like4like/ios/Pods/Target Support Files/social_share/social_share-prefix.pch:2:
In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:595:1: note: 'stringByAddingPercentEscapesUsingEncoding:' has been explicitly marked deprecated here
- (nullable NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc API_DEPRECATED("Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.", macos(10.0,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));
^
/Users/apple/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/social_share-2.0.5/ios/Classes/SocialSharePlugin.m:265:67: warning: 'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid. [-Wdeprecated-declarations]
NSURL * whatsappURL = [NSURL URLWithString:[urlWhats stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
^
In module 'UIKit' imported from /Users/apple/AndroidStudioProjects/flutter_app_like4like/ios/Pods/Target Support Files/social_share/social_share-prefix.pch:2:
In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:595:1: note: 'stringByAddingPercentEscapesUsingEncoding:' has been explicitly marked deprecated here
- (nullable NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc API_DEPRECATED("Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.", macos(10.0,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));
^
/Users/apple/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/social_share-2.0.5/ios/Classes/SocialSharePlugin.m:267:87: error: expected expression
[[UIApplication sharedApplication] openURL:options:completionHandler:: whatsappURL];
^
/Users/apple/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/social_share-2.0.5/ios/Classes/SocialSharePlugin.m:277:76: warning: 'stringByAddingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid. [-Wdeprecated-declarations]
NSURL * telegramURL = [NSURL URLWithString:[urlScheme stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
^
In module 'UIKit' imported from /Users/apple/AndroidStudioProjects/flutter_app_like4like/ios/Pods/Target Support Files/social_share/social_share-prefix.pch:2:
In module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:595:1: note: 'stringByAddingPercentEscapesUsingEncoding:' has been explicitly marked deprecated here
- (nullable NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc API_DEPRECATED("Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid.", macos(10.0,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));
^
/Users/apple/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/social_share-2.0.5/ios/Classes/SocialSharePlugin.m:267:61: error: use of undeclared identifier 'options'
[[UIApplication sharedApplication] openURL:options:completionHandler:: whatsappURL];
^
/Users/apple/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/social_share-2.0.5/ios/Classes/SocialSharePlugin.m:267:69: error: use of undeclared identifier 'completionHandler'
[[UIApplication sharedApplication] openURL:options:completionHandler:: whatsappURL];
^
4 warnings and 3 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

Can't share to Facebook and Instagram because the image to share can't be found

Hey,

I tried using this plugin to share to facebook and instagram but the plugin can't find my image files in 'assets', even though I know they exist (through Image.asset("assets/etc.png").

For example, this throws a File Not Found error:

SocialShare.shareInstagramStory( "assets/instagram.png", "#6041B1", "#ffffff", "our link url");

@ShekarMudaliyar how do I correctly use images from the assets folder? I've followed all the setup steps mentioned in the readme file.

Thanks!

Sharefacebookstory not working

SocialShare.shareFacebookStory(imageFile.path,
"#ffffff", "#000000", "https://deep-link-url",
appId: "xxxxxx");
this does nothing when called.
shareinstagram story is working fine.I tried to fnd the reason but i didnt find anything useful

[android] Can't have multiple FileProviders

error sharing Facebook & Instagram

Hi and thanks for your work ;-) !!
I have an error when trying to share on Instagram or Facebook, only tried on Android, the error on console is:

D/ (20476): company.appname.MainActivity@4e82c7c
I/flutter (20476): error

Issue: java.lang.IllegalArgumentException: Couldn't find meta-data for provider with authority com.iot_security.com.shekarmudaliyar.social_share

Hi, this is where the code is pointing the error

`FlatButton(
     onPressed: () async {
           final tempDir = await getTemporaryDirectory();
           final file = await new File( '${tempDir.path}/image.png').create();
           file.writeAsBytesSync(inviteQr);
           SocialShare.shareOptions("Este convite expira em $expireTime horas",
                                                  imagePath: '${tempDir.path}/image.png');
       },
      child: Text("Compartilhar"))`

The log:

`E/MethodChannel#social_share(26801): Failed to handle method call
E/MethodChannel#social_share(26801): java.lang.IllegalArgumentException: Couldn't find meta-data for provider with authority com.iot_security.com.shekarmudaliyar.social_share
E/MethodChannel#social_share(26801): 	at androidx.core.content.FileProvider.parsePathStrategy(FileProvider.java:606)
E/MethodChannel#social_share(26801): 	at androidx.core.content.FileProvider.getPathStrategy(FileProvider.java:579)
E/MethodChannel#social_share(26801): 	at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:417)
E/MethodChannel#social_share(26801): 	at com.shekarmudaliyar.social_share.SocialSharePlugin.onMethodCall(SocialSharePlugin.kt:110)
E/MethodChannel#social_share(26801): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:230)
E/MethodChannel#social_share(26801): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#social_share(26801): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/MethodChannel#social_share(26801): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#social_share(26801): 	at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#social_share(26801): 	at android.os.Looper.loop(Looper.java:136)
E/MethodChannel#social_share(26801): 	at android.app.ActivityThread.main(ActivityThread.java:6123)
E/MethodChannel#social_share(26801): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#social_share(26801): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
E/MethodChannel#social_share(26801): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
E/flutter (26801): [ERROR:flutter/lib/ui/ui_dart_state.cc(171)] Unhandled Exception: PlatformException(error, Couldn't find meta-data for provider with authority com.iot_security.com.shekarmudaliyar.social_share, null)
E/flutter (26801): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:571:7)
E/flutter (26801): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:160:18)
E/flutter (26801): <asynchronous suspension>
E/flutter (26801): #2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:333:12)
E/flutter (26801): #3      SocialShare.shareOptions (package:social_share/social_share.dart:217:41)
E/flutter (26801): <asynchronous suspension>
E/flutter (26801): #4      _InviteScreenState.qrCode.<anonymous closure> (package:iot_security/Screens/inviteScreen.dart:126:47)
E/flutter (26801): <asynchronous suspension>
E/flutter (26801): #5      _InviteScreenState.qrCode.<anonymous closure> (package:iot_security/Screens/inviteScreen.dart)
E/flutter (26801): #6      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:993:19)
E/flutter (26801): #7      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:1111:38)
E/flutter (26801): #8      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:183:24)
E/flutter (26801): #9      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:598:11)
E/flutter (26801): #10     BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:287:5)
E/flutter (26801): #11     BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:222:7)
E/flutter (26801): #12     PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:476:9)
E/flutter (26801): #13     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:77:12)
E/flutter (26801): #14     PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:122:9)
E/flutter (26801): #15     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
E/flutter (26801): #16     PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:120:18)
E/flutter (26801): #17     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:106:7)
E/flutter (26801): #18     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:219:19)
E/flutter (26801): #19     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:199:22)
E/flutter (26801): #20     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:157:7)
E/flutter (26801): #21     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:103:7)
E/flutter (26801): #22     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:87:7)
E/flutter (26801): #23     _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter (26801): #24     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (26801): #25     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (26801): #26     _invoke1 (dart:ui/hooks.dart:267:10)
E/flutter (26801): #27     _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)`

My android.manifest:

`<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.iot_security">
    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
         calls FlutterMain.startInitialization(this); in its onCreate method.
         In most cases you can leave this as-is, but you if you want to provide
         additional functionality it is fine to subclass or reimplement
         FlutterApplication and put your custom class here. -->
    <uses-permission android:name="android.permission.INTERNET"/>
    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="iot_security"
        android:icon="@mipmap/ic_launcher">
        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="com.iot_security.com.shekarmudaliyar.social_share"
            android:exported="false"
            android:grantUriPermissions="true"
            tools:replace="android:authorities">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/filepaths" />
        </provider>
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
              android:name="io.flutter.embedding.android.NormalTheme"
              android:resource="@style/NormalTheme"
              />
            <!-- Displays an Android View that continues showing the launch screen
                 Drawable until Flutter paints its first frame, then this splash
                 screen fades out. A splash screen is useful to avoid any visual
                 gap between the end of Android's launch screen and the painting of
                 Flutter's first frame. -->
            <meta-data
              android:name="io.flutter.embedding.android.SplashScreenDrawable"
              android:resource="@drawable/launch_background"
              />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <!-- Don't delete the meta-data below.
             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
        <meta-data
            android:name="flutterEmbedding"
            android:value="2" />
    </application>
</manifest>
`

I'm using social_share: ^2.0.5 and path_provider: ^1.6.16 between others plugins, this is the first issue I open, hope there is everything that can help, none of the solutions I found worked for me.

2.1.1 shareInstagramStory crashes

Prior to upgrading, 2.0.5 worked fine. After upgrading to 2.1.1 with Flutter 2, SocialShare.shareInstagramStory crashes with this error: -[NSNull length]: unrecognized selector sent to instance 0x207554a00

Share audio on Whatsapp

It is a great plugin, thank you for developing it.

Is there a way to share audio clips on whatsapp? I could not find an option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.