Open kurenov opened 2 years ago
Same for me, calling share ig stories prints similar log you provided
D/ ( 5309): com.xxx.xxx.MainActivity@c5fdd71
same issue for me as well with social_share: ^2.2.1
same issue for me. Version of social_share is 2.2.1
After trying to solve this issue for way too long, I found out that since Android 11 there are more restrictions on how other apps on the phone can be queried (https://medium.com/androiddevelopers/package-visibility-in-android-11-cc857f221cd9).
So adding this to the AndroidManifest.xml
solved the issue for me:
<manifest package="com.example.your_package">
<queries>
<package android:name="com.instagram.android" />
</queries>
...
</manifest>
The example is improved with all the latest Android 11 manifest tags and more features here: https://github.com/ShekarMudaliyar/social_share/issues/116
After trying to solve this issue for way too long, I found out that since Android 11 there are more restrictions on how other apps on the phone can be queried (https://medium.com/androiddevelopers/package-visibility-in-android-11-cc857f221cd9).
So adding this to the
AndroidManifest.xml
solved the issue for me:<manifest package="com.example.your_package"> <queries> <package android:name="com.instagram.android" /> </queries> ... </manifest>
you should add this for await SocialShare.checkInstalledAppsForShare()
too
When I try to share Instagram Story directly via
SocialShare.shareInstagramStory
, it doesn't work for me. No error messages. Instagram app isn't opened. It fails with following log only:However, it works only if I try to share via Native options (
SocialShare.shareOptions
) first. After I tryNative options
->Instagram Stories
, thenshareInstagramStory
starts working as expected. It keeps working until emulator is restarted.Note that sharing a Story via Native Options doesn't work as expected. Instagram app is opened with no image. When options as opened, I get following error logs:
However,
Instagram Direct
&Instagram Feed
sharing work well.Emulator: Nexus 5, API 30, Android 11.0 x86
Flutter 3.0.2, Dart 2.17.3