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
0 answers
Install application wrapper script wrap.sh
Android offers a really powerful way to control application process start - it is so called wrapper script. It is a simple shell script named wrap.sh that should be placed in the app installation lib/ directory (one that contains native libraries,…

Sergio
- 8,099
- 2
- 26
- 52
2
votes
1 answer
Android intent's resolveActivity and Package Manager
To check if an intent can be handled, you would call:
if (intent.resolveActivity(getPackageManager()) != null) {
// start activity
}
Question - why is the parameter to package manager needed if the same getPackageManager() is always passed? Are…

Boon
- 40,656
- 60
- 209
- 315
2
votes
1 answer
Cannot find android.app.ApplicationPackageManager
When compiling the following example from the robolectric migration guide
package com.jongla.soundmash.robolectric
import org.robolectric.shadows.ShadowApplicationPackageManager
import org.robolectric.annotation.Implements
import…

mikesol
- 1,177
- 1
- 11
- 20
2
votes
0 answers
Unable to Install Application in Android Nougat programmatically
I have been trying to make an Android system application to automatically install an apk. It was working fine in Marshmallow.
My application is platform signed and android.uid.system.
Here is the code:
private static boolean installPackage(Context…

Prabeer
- 21
- 1
2
votes
0 answers
Obtain a list of device wide active/installed device administrators
Is there a way for an app to obtain a list of device wide active and installed device administrators?
DevicePolicyManager.getActiveAdmins() is able to get a list of active(enabled) device administrators, and PackageManager.queryBroadcastReceivers()…

user1118764
- 9,255
- 18
- 61
- 113
2
votes
1 answer
What does error code -112 mean in Android
I get the following error when I install an android app:
InstallAppProgress: Installation error code: -112
Above I see an error from the PackageManager which will be the issue, but I would like to know what -112 stand for?

Vincent
- 6,058
- 15
- 52
- 94
2
votes
1 answer
How to get a list of android installed apps which accept http: as URI?
i guess packagemanager is the starting point but it seems that it is quite complicated.
i want to list the set of supporting app accepting http: in a list with its launcher icon, clicking it will launch the app.
thank you

DayDayHappy
- 1,679
- 1
- 15
- 26
2
votes
1 answer
enable/disable packages programmatically
How can I enable/disable a whole package programmatically from a Android System application?
In this post, a component is enabled/disabled programmatically, but not a whole package.
I want to achieve the same result that is achieved by the root…

Amitai Fensterheim
- 722
- 7
- 22
2
votes
1 answer
How to replace directoy of another app package from assets folder
I want to replace the directory which is present in another application package folder ( /data/data/com.***/directory to be replaced)

Jadav Nirav
- 89
- 1
- 5
2
votes
2 answers
Checking if the camera can be used in Android vs. resolveActivity on the Intent
I'm seeing a few different things online so I wanted to make sure I was doing it correctly:
To check if a phone has a camera:
PackageManager pm = context.getPackageManager();
if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
…

KaliMa
- 1,970
- 6
- 26
- 51
2
votes
3 answers
how to get currently selected application package name in android programmatically?
I have created custom soft keyboard with images and my task is want to send selected image to the currently selected Application by the user like google hangout but i can get Installed application package name and icon using Package Manager like…

MahaJeyaraj
- 33
- 4
2
votes
1 answer
How to get Intent filters using PackageManager.GET_INTENT_FILTERS
Is there a way i can get intent filters supported by an app by using PackageManager.GET_INTENT_FILTERS option since i can't find a method that returns packageinfo instance?
List…

Edijae Crusar
- 3,473
- 3
- 37
- 74
2
votes
1 answer
Unable to acquire intent filter from ResolveInfo instance
I have a list which contain apps that can handle any of my two actions Intent.ACTION_PICK and MediaStore.ACTION_IMAGE_CAPTURE. i later on use an array adapter to populate my listivew with the information from this list.
In my onItemClickListener, am…

Edijae Crusar
- 3,473
- 3
- 37
- 74
2
votes
0 answers
Hide app from launcher and application manager
I'm working on an application in which I need to hide the app from the launcher and also the application manager.
I use this code to hide the application from the launcher:
PackageManager p =…

Anish Kumar
- 478
- 4
- 12
- 27
2
votes
0 answers
Android: Get app name from account type
My app need to know the application name from the account type. I am getting the account type from the code :
AccountManager am = AccountManager.get(this);
Account[] acc = am.getAccounts();
if (acc.length > 0) {
for (int accLength = 0; accLength…

Manoj Fegde
- 4,786
- 15
- 50
- 95