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
3
votes
1 answer
How to initialize or access packageManager out from coroutineContext?
I have a Jetpack Compose project were I can access a coroutineContext object only. No context available here.
How can I access or initialize android.content.pm.PackageManager ?

Ralf Wickum
- 2,850
- 9
- 55
- 103
3
votes
2 answers
How to find installed applications in Android?
I want to get the name and package name of a third party application installed in Android.
I have tried but I got the name of all applications (third party and pre installed).
How can I identify whether an application is a system application or an…

nirav
- 411
- 2
- 8
- 18
3
votes
1 answer
How to parse an APK after converting it to a minimal one?
Background
I want to be able to parse APK files from various sources, or various kinds. I want to get only very specific, basic information about them:
package-name
version-code
version-name
label (app name)
icon
minSdkVersion
whether it's a split…

android developer
- 114,585
- 152
- 739
- 1,270
3
votes
1 answer
How to calculate hash of APK file programmatically?
I want to calculate the MD5 hash of the APK file from inside the app.
PackageInfo info = App.getInstance().getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA);
File file = new…

Manuel
- 14,274
- 6
- 57
- 130
3
votes
0 answers
Android: how can I disable play protect through device policy manager as device owner?
When I try to download and install a 3rd party app using the PackageInstaller service from my device owner/provisioning app Google Play shows a prompt before the app is installed. I can accept or decline and it doesnt affect the installation, but…

geoxile
- 348
- 1
- 6
- 16
3
votes
1 answer
Install APK as system app with INSTALL_PACKAGES
I have developed an app that is running with system permissions (it is built into the image of AOSP) and has the INSTALL_PACKAGES permission.
My goal is to install a APK silently in the background without user interaction. I read different…

phoebus
- 1,280
- 1
- 16
- 36
3
votes
1 answer
How to determine if an APK is compatible with device supported ABIs?
I created an app that is used for app distribution.
It downloads apk files and prompts the user to install them.
If I distribute an app with native code only for x86_x64 it won't install on a arm / arm64 device.
The package installer says that the…

Philip Zultan
- 184
- 1
- 8
3
votes
0 answers
Package installer doesn't ask to click on "Done" or "Open" after updating app programmatically
My app has Auto-Update feature. I install apk file using this code:
Uri uri;
Intent intent;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
uri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".provider", file);
…

Alireza Noorali
- 3,129
- 2
- 33
- 80
3
votes
0 answers
How to check all the GRANTED Permission of all the installed apps whose sdk version is less than 23 like viber
Here is my code please check
List getGrantedPermissions(final String appPackage) {
List granted = new ArrayList();
try {
PackageInfo pi = getPackageManager().getPackageInfo(appPackage, PackageManager.GET_PERMISSIONS);
…

vikas aggarwal
- 468
- 3
- 9
3
votes
1 answer
How to launch AFW badge apps from adb shell command?
I am unable to launch Android For work enabled apps from Adb shell command?
Can some one plz give example?
Refer attached screen, I want to launch Playstore app.
Without badge ICON play store app has the same activity info with the badged…

Sridhar Reddy S
- 121
- 2
- 13
3
votes
2 answers
Android get list of non Play Store apps
As a safety measure I would like to get the list of apps that aren't installed from the Play Store. Is there a way to do this?
The packageManager contains a method getInstalledApplications but I don't know which flags to add to get the list. Any…

Wirling
- 4,810
- 3
- 48
- 78
3
votes
1 answer
How to catch Accessibility events only when the app is in foreground and not from the notifications?
I have an AccessibilityService that listens to events from a specific package XYZ. I want to be notified only when an app is actually launched (or running in the foreground). But when my service is registered to listen to TYPE_WINDOW_CONTENT_CHANGED…

Sakethram
- 43
- 6
3
votes
0 answers
How to create an Android library plugin system that updates parent package's app permissions?
I would like to create a plugin system for my Android project, so that you can plug in different modules as needed.
The thing is: Some modules require app permissions, so the AndroidManifest.xml also needs to change based on what module you…

Vlad
- 8,038
- 14
- 60
- 92
3
votes
1 answer
android-W/PackageManager: Package named<> does not exist
I published an android app and after a while, when I wanted to edit it and publish a new version. So I imported it in Android Studio.
My problem is the Android Studio does not run my app on my device and shows this message:
What can I do to fix it?

faeze saghafi
- 650
- 10
- 25
3
votes
2 answers
getExtras() return null on Application level (-class)
On my Application level I receive null for getExtras(), but on Activity level i can see them correctly.
public class MyApplication extends Application
{
@Override
public void onCreate() {
super.onCreate();
Intent intent =…

RedHat
- 167
- 11