Class for retrieving various kinds of information related to the application packages that are currently installed on the device. You can find this class through getPackageManager().
Questions tagged [android-package-managers]
561 questions
2
votes
1 answer
How can i compare text view string and array adapter class app-name string
I am beginner in android. I want to open installed application through my application with the help of google translator.
Like user speak "whatsapp" then my app convert it into text. and by text i will open installed application.
I have done speech…

Hardik Dhaduk
- 19
- 2
2
votes
1 answer
Permissions protectionLevel wrong?
I'm trying to adapt my code for Android Marshmallow.
I wrote a function to check if a permission is revocable or not (PROTECTION_NORMAL and PROTECTION_SIGNATURE are granted upon install).
Running on API-22, Manifest.permission.READ_PHONE_STATE…

shkschneider
- 17,833
- 13
- 59
- 112
2
votes
0 answers
Market API not finding all categories
I am using the Market API, I know it is unofficial, but I want to get the categories of all apps in my device, and it's the only way.
This is my code:
String query = "com.android.example";
MarketSession session = new…

offset
- 1,407
- 1
- 16
- 34
2
votes
1 answer
Android getLaunchIntentForPackage returns null
I am making the following call:
Intent launchIntent = context.getPackageManager()
.getLaunchIntentForPackage(packageName);
It crashes with NPE with the following stackTrace:
java.lang.NullPointerException…

JY2k
- 2,879
- 1
- 31
- 60
2
votes
1 answer
What's "PackageInstaller" class on Lollipop, and how to use it?
Background
I've noticed there is a new function on the PackageManager called "getPackageInstaller" , with minAPI 21 (Lollipop).
I've reached the "PackageInstaller" class, and this is what it is written about it:
Offers the ability to install,…

android developer
- 114,585
- 152
- 739
- 1,270
2
votes
1 answer
getPacketManager().resolveActivity(...) - Fails only with system applications
When i call the resolveActivity() function with system packageNames i receive the following exception:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getHost()' on a null object reference
…

Ari
- 1,361
- 1
- 15
- 23
2
votes
2 answers
How to programmatically force quit (or temporarily disable) Google App
Is there a way to force-quit Google App (AKA Google Search) from my app?
If so, how to do that?

Introspective
- 554
- 2
- 5
- 13
2
votes
1 answer
How to detect permission access of other apps?
I'm searching for a way to detect permission usage of other apps. The key idea is to detect, when other apps are accessing media or sensors (e.g. microphone).
I want to implement a service, which is looking for any permission usages, so that the…

RuNaWaY87
- 689
- 1
- 5
- 12
2
votes
3 answers
unistall android application programmatically
I want to be able to allow my users to uninstall application from my application. Just like what Google Play Store allow to their users(Please below image)
the main question is that how can define a button that by pressing it we can uninstall an…

Husein Behboudi Rad
- 5,434
- 11
- 57
- 115
2
votes
1 answer
Close another app from an activity
How do I close another app from an activity?
I know that I can close another activity using startactivityforintent but how do I do the same process for closing an app which the activity started?
I opened another app as shown below:
PackageManager…

shashank
- 41
- 8
2
votes
2 answers
Upgrade home launcher app from .apk file
I am trying to upgrade home app from .apk file stored in external sdcard. But, the bellow error appears infinity and then the device is re-booted itself.
09-25 11:58:44.040: I/ActivityManager(1313): Force finishing activity ActivityRecord{4238d680…

JK Park
- 107
- 8
2
votes
1 answer
Creating an intent chooser without launching the selected intent
I was trying to create an intent chooser in order to store the user's selected intent for later use, but nothing seems to work.
Intent.CreateChooser only seems to work when actually launching the intent, and even then it doesn't return the selected…

Elad Avron
- 1,411
- 1
- 18
- 28
2
votes
2 answers
Check if Activity is Launcher from ActivityInfo/PackageManager
I need to check if an installed app has a specific launcher activity class (based on the package name of the app).
I can get the list of activities and find the correct class with this:
PackageInfo info =…

Diana
- 75
- 1
- 9
2
votes
3 answers
How to get the PackageName in a listview of an Android App using PackageManager
The app I am developing requires that I get the package name using PackageManager.
I am able to get the App Icon and and App Name but how do I get the packagename in a way similar to what I have below?
Drawable appIcon = packageManager
…

Rohit Tigga
- 2,373
- 9
- 43
- 81
2
votes
2 answers
Starting ANY of the installed apps
i have and app in which the user can scroll through a list of all installed apps and he can pick any app and starts it.
For most Apps this works fine with:
startActivity(getPackageManager().getLaunchIntentForPackage(packageName_selectedapp));
where…

treesoft
- 295
- 2
- 14