Open niyasali64 opened 1 year ago
@niyasali64 Can you please try this in AndroidManifest.xml it's working for me after adding this
<queries>
<package android:name="com.test.yourapp" />
</queries>
I'm facing the same. isInstalled is returning false for known installed apps.
From GPT4 summarizing something that I loosely remembered:
starting with Android 10 (API level 29), Google introduced additional restrictions and changes regarding privacy and how apps can interact with other apps installed on the same device. One of the key changes affects an app's ability to query the presence of other apps on the device. This change was implemented as part of Android's ongoing efforts to enhance user privacy.
Before Android 10, apps could freely query the list of installed apps on a device. This capability could be used for various purposes, such as checking for the presence of companion apps, competitive analysis, or feature enhancement based on available apps. However, this could also potentially be exploited to gather information about the user without their knowledge.
With Android 10, Google restricted this capability. Apps now need to declare specific permissions in their manifest file to query installed apps. Specifically, apps must declare the QUERY_ALL_PACKAGES
permission in their AndroidManifest.xml file to query any app that's installed on the device, not just those that they can interact with directly.
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
QUERY_ALL_PACKAGES
permission, which is subject to Google Play's policy restrictions and review.QUERY_ALL_PACKAGES
permission, limiting its use to apps that have a core need to discover any apps installed on the device for their functionality. Apps that request this permission without a valid use case may be rejected from the Google Play Store.Developers are encouraged to minimize their use of the QUERY_ALL_PACKAGES
permission and only request it when absolutely necessary for the app's function. Instead of querying all apps, developers can use more specific intents and queries for interacting with other apps, such as using Intent
filters to discover apps that can perform a specific action (e.g., opening an email client) without needing to know all apps installed on the device.
For opening an email client, as discussed earlier, using an intent with the action Intent.ACTION_SENDTO
and a mailto URI (mailto:
) is a privacy-friendly approach that doesn't require querying installed apps and is compliant with Android 10's privacy enhancements.
The App2 is installed, Working on up to Android 9. But afterward not working, it is going to the play store link,