Home > OS >  Flutter social_share `checkInstalledAppsForShare()` returns false for apps that are installed
Flutter social_share `checkInstalledAppsForShare()` returns false for apps that are installed

Time:09-13

I copied an example from https://pub.dev/packages/social_share/example.

I have installed Instagram on my Android emulator, but still this piece of code:

 SocialShare.checkInstalledAppsForShare().then((data) {
                      print(data.toString());
                    });

returns {sms: false, instagram: false, facebook: false, twitter: false, whatsapp: false, telegram: false}

Is it an emulator problem?

CodePudding user response:

Add In AndroidManifest.xml

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
  • Related