Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

everything is false in checkInstalledAppsForShare #81

Open
ArtemZip opened this issue Aug 21, 2021 · 4 comments · May be fixed by #97 or #108
Open

everything is false in checkInstalledAppsForShare #81

ArtemZip opened this issue Aug 21, 2021 · 4 comments · May be fixed by #97 or #108

Comments

@ArtemZip
Copy link

SocialShare.checkInstalledAppsForShare().then((value) => {
  value?.forEach((key, value) {print("$key : $value");})
});

Output:

I/flutter ( 2860): sms : false
I/flutter ( 2860): instagram : false
I/flutter ( 2860): facebook : false
I/flutter ( 2860): twitter : false
I/flutter ( 2860): whatsapp : false
I/flutter ( 2860): telegram : false

Version: ^2.1.1
Also, sharing is not working, I think because of that.

@ArtemZip
Copy link
Author

Solved by downgrading compileSdkVersion and targetSdkVersion to 28 instead of 30

@somy360
Copy link

somy360 commented Dec 9, 2021

Adding

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

In AndroidManifest.xml also solved this issue for me

@rishabh89
Copy link

rishabh89 commented May 5, 2022

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

Solved by downgrading compileSdkVersion and targetSdkVersion to 28 instead of 30

what about iOS

@guilhermeagostinelli guilhermeagostinelli linked a pull request Jun 15, 2022 that will close this issue
@guilhermeagostinelli
Copy link
Contributor

Adding

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

In AndroidManifest.xml also solved this issue for me

Recently Google announced that they are restricting the usage of QUERY_ALL_PACKAGES, allowing it to be used only for apps that must discover any and all installed apps on the device, for awareness or interoperability purposes. In order to publish new apps or updates, app developers will also be required to submit a Permissions Declaration Form explaining why the app really needs such broad permission.

So, it would be better to use a less broad app-visibility method, such as the <queries> element to specify exactly which packages to query.

Adding the following under the <manifest> tag of your AndroidManifest.xml file will suffice:

<queries>
    <package android:name="com.instagram.android" />
    <package android:name="com.facebook.katana" />
    <package android:name="com.twitter.android" />
    <package android:name="com.whatsapp" />
    <package android:name="org.telegram.messenger" />
</queries>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants