Find all installed apps android

How to get a list of installed apps in Android 11

In Android 11, we can see a lot of updates that improve privacy. If your app uses the PackageManager methods to get the list of installed apps in the user’s device, you will have to make some changes in your code for devices using Android 11. In this blog post, we will be discussing all our options.

If you are already querying the user’s installed apps, the following code snippet will look familiar. This is how you can get a list of installed apps of the user.

Now for your users using Android 11, the code remains the same but it won’t work unless you add some additional elements in the AndroidManifest .

There are 3 different ways of querying installed apps of the user in Android 11. Let’s have a look at them:

Query specific packages

If you already know which apps you want to query just mention the package names inside the element in the AndroidManifest .

Query using intent filter

In case you don’t know all the package names of the apps that you want to query but there is a set of apps with similar functionality that you want to query then you can use an intent filter inside the element according to your requirements like it has been done in the code snippet below.

The element looks like but there are few differences. element has the following restrictions:

Query all the apps

If you want to query all the apps of the user like you were doing earlier, you need to include QUERY_ALL_PACKAGES permission in the AndroidManifest . It is a normal permission and it is granted as soon as the app is installed.

Ideally one should request the least amount of packages and respect the user’s privacy. In most cases this permission won’t be required, only for apps like launchers it makes sense to ask the user for permission to query all the installed apps on their phone.

Читайте также:  Навител карты россии для андроид полная версия

There is one loophole that I noticed while exploring the element if you add android.intent.action.MAIN as the action element in the intent filter, you can see almost all the apps of the user without adding the permission since almost all apps would have this element in the AndroidManifest .

Thanks for reading! If you enjoyed this story, please click the 👏 button and share it to help others!

If you have any kind of feedback, feel free to connect with me on Twitter .

Источник

How Find Installed Apps From Google Play Store On Android

Here, are quick steps to find the list of installed apps from Google Play Store On Android. It is quite easy to find installed apps from your Android phone, but Google also provides a way to find installed apps directly from Android market.

Just follow the below steps to find the list of installed apps from Google Play Store on Android.

Steps To Find Installed Apps From Google Play Store from PC:

Just go to Google Play Store. Login with the same Google account that you use on your Android phone while installing apps. You will see a menu option on Right side as “My Android Apps”. Just click on that, and you’ll be able to see all the installed apps that are on your Android phone.

Best part of this listing is that it shows even those apps which you had earlier installed, but are not on your phone anymore. Those apps show an “Install” option, which tells you that these apps are not on your phone now.

For that apps that are on your phone currently, you will see “Installed” as the option.

Steps To Find Installed Apps From Google Play Store from Android:

Step 1: Sign-up or login to Google Play Store.

Step 2: Tap on the options menu from the home page of Google Play Store.

Step 3: Tap on “My Apps” option from the options menu.

Step 4: Now you will see the list of all the apps installed on your Android phone.

From there you will also find all the pending app updates in Google Play Store. You can update the apps easily from My Apps option in Google Play Store. Also, you will find the recently uninstalled apps in My Apps option from Google Play Store. you can easily install the recently uninstalled apps, if you need them again on your Android phone. With this you don’t need to search for the app again to install it on your Android phone.

Читайте также:  Android как настроить переадресацию

If you tap on any app which is already installed on your Android phone, then you can enable or disable automatic update of the app from Google Play Store itself.

Источник

davidnunez / gist:1404789

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters

pm list packages -f

This comment has been minimized.

Copy link Quote reply

full-of-foo commented Nov 15, 2013

This comment has been minimized.

Copy link Quote reply

full-of-foo commented Nov 15, 2013

Nice one liner: » adb shell ‘pm list packages -f’ »

This comment has been minimized.

Copy link Quote reply

banshee commented May 1, 2014

And for just the packages:

adb shell ‘pm list packages -f’ | sed -e ‘s/.*=//’ | sort

Need to delete a bunch of things? This gives you an uninstall for everything that’s installed; cut and paste to adjust:

adb shell ‘pm list packages -f’ | sed -e ‘s/.*=//’ | sed -e ‘s/^/adb uninstall /’ | sort | less

This comment has been minimized.

Copy link Quote reply

sunnychan2012 commented Jul 31, 2014

how to save it as a notepad text file?
I found the answer:
adb shell pm list packages -f > b:\1.txt

This comment has been minimized.

Copy link Quote reply

amr commented Sep 13, 2014

Building up on banshee’s one liner, for me there was a trailing \r, removing it was needed, as such:

adb shell ‘pm list packages -f’ | sed -e ‘s/.*=//’ | sed ‘s/\r//g’ | sort

Only then I was able to do get the following to work:

Источник

How to Get List of Installed Apps in Android

Android PackageManager class is used to retrieve information on the application packages that are currently installed on the device. You can get an instance of PackageManager class by calling getPackageManager() . PackageManager provides methods for querying and manipulating installed packages and related permissions, etc. In this Android example, we we get list of installed apps in Android.

packageManager.getInstalledApplications() return a List of all application packages that are installed on the device. If we set the flag GET_UNINSTALLED_PACKAGES has been set, a list of all applications including those deleted with DONT_DELETE_DATA (partially installed apps with data directory) will be returned.

1. Creating application layout in xml

activity_main.xml

As you can see in the attached screenshot, we will be creating a ListView to show all of the installed applications in android.

snippet_list_row.xml

This layout is being used by the ListView Adapter for representing application details. It shows application icon, application name and application package.

2. Writing Java class

AllAppsActivity.java

This is the main application class that is used to initialize and list the installed applications. As getting the list of application details from PackageManage is a long running task, we will do that in AsyncTask. Also, this class is using custom Adapter “ApplicationAdapter” for custom ListView.

Читайте также:  Handling events in android

ApplicationAdapter.java

Download Complete Example

Download complete Eclipse project source code from GitHub.

Источник

Package visibility in Android 11

On Android 10 and earlier, apps could query the full list of installed apps on the system using methods like queryIntentActivities() . In most cases, this is far broader access than is necessary for an app to implement its functionality. With our ongoing focus on privacy, we’re introducing changes on how apps can query and interact with other installed apps on the same device on Android 11. In particular, we’re bringing better scoped access to the list of apps installed on a given device.

To provide better accountability for access to installed apps on a device, apps targeting Android 11 (API level 30) will see a filtered list of installed apps by default. In order to access a broader list of installed apps, an app can specify information about apps they need to query and interact with directly. This can be done by adding a element in the Android manifest.

For most common scenarios, including any implicit intents started with startActivity() , you won’t have to change anything! For other scenarios, like opening a specific third party application directly from your UI, developers will have to explicitly list the application package names or intent filter signatures like this:

If you use Custom Tabs to open URLs, you might be calling resolveActivity() and queryIntentActivities() in order to launch a non-browser app if one is available for the URL. In Android 11 there’s a better way to do this, which avoids the need to query other apps: the FLAG_ACTIVITY_REQUIRE_NON_BROWSER intent flag. When you call startActivity() with this flag, an ActivityNotFoundException will be thrown if a browser would have been launched. When this happens, you can open the URL in a Custom Tab instead.

In rare cases, your app might need to query or interact with all installed apps on a device, independent of the components they contain. To allow your app to see all other installed apps, Android 11 introduces the QUERY_ALL_PACKAGES permission. In an upcoming Google Play policy update, look for guidelines for apps that need the QUERY_ALL_PACKAGES permission.

When targeting API level 30 and adding a element to your app, use the latest available release of the Android Gradle plugin. Soon we’ll be releasing updates to older Android Gradle plugin versions to add support for this element. You can find more information and use cases about Package Visibility in the developer documentation.

Источник

Оцените статью