Questions tagged [android-package-managers]

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().

561 questions
17
votes
2 answers

Android M reflection method freeStorageAndNotify exception

I'm using reflection method freeStorageAndNotify: Method freeStorageAndNotify = null; freeStorageAndNotify = service.packageManager.getClass().getMethod( "freeStorageAndNotify", long.class,…
Udi Oshi
  • 6,787
  • 7
  • 47
  • 65
17
votes
8 answers

Get minSdkVersion and targetSdkVersion from apk file

I am trying to get the values of minSdkVersion and targetSdkVersion from an apk stored on the device. Getting other details are discussed here, but only the targetSdkVersion is available in the ApplicationInfo class. Can the minSdkVersion be…
Ruben Roy
  • 587
  • 3
  • 15
  • 28
16
votes
0 answers

Android - Failure [INSTALL_FAILED_INTERNAL_ERROR]

I'm having some problems trying to install APKs in a specific device. I have lots of devices and it hadn't happened so far (all of them, Radxa Rock Pro). When I run pm install myApp I get root@radxaPro:/ # pm install /sdcard/myApp.apk pkg:…
jose
  • 256
  • 2
  • 7
15
votes
3 answers

Get active Application name in Android

I am trying to make a program that shows all the active applications. I searched everywhere but could only find code that shows the package name only. It would be of great help if you masters can tell me how to display all the active application…
Shijilal
  • 2,175
  • 10
  • 32
  • 55
15
votes
2 answers

What is the InstallerPackageName when app is in "pending publication" phase and used/reviewed by reviewers/testers (Google Play Store)?

SITUATION I have a set of functionalities in my app which changes based on the store it is installed from. E.g. I want to have a more restricted set of advertisements displayed for family audiences and children to be eligible for the Google Play for…
Viral Patel
  • 32,418
  • 18
  • 82
  • 110
14
votes
10 answers

How to get the list of apps that have been installed by a user on an Android device?

I am using the following piece of code at the moment: List packs = getPackageManager().getInstalledPackages(0); but it returns Apps that have been installed by the both device manufacturer and me. How to limit it so that only the apps…
12
votes
1 answer

How to get a list of installed apps in Android 11

This line is described on the developer site but I did not understand it perfectly Call getInstalledApplications() or getInstalledPackages(). Both methods should return a filtered list. Actually, I need to test Testing package visibility…
12
votes
2 answers

Turn off notifications of an app programatically on Android

I am developing a package manager application which shows checkboxes to turn off notifications from different applications installed on the Android device. Since Android 4.1, users can turn off notifications of an app from application manager. Can…
Gopinath
  • 12,981
  • 6
  • 36
  • 50
12
votes
4 answers

Remove Activity as Default Launcher

I set my activity as a default launcher to intercept home button clicks like so:
11
votes
5 answers

Error: attribute 'package' in tag is not a valid Android package name

I am trying to write an android app, which used to build once upon a time. Now, everytime I build, I get the following error: Caused by: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking…
jay p
  • 175
  • 1
  • 2
  • 9
11
votes
1 answer

Android: DownloadManager and COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED

I'm trying to work around disabled Download Manager correctly. Best info I could find is How to Enable Android Download Manager. PackageManager.COMPONENT_ENABLED_STATE_DISABLED and PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER states are…
11
votes
2 answers

List of default apps showing wrong in Android L

I want to get all default apps in Android L. I used bellow code but they give me a wrong solution. Let see my code first private void getMyAppLauncherDefault() { final IntentFilter filter = new IntentFilter(Intent.ACTION_MAIN); …
11
votes
4 answers

After Renaming Package Name in android studio Launching error, Runtime Error

I have one project in android studio, I have first exported project from eclipse to android studio. After that I have changed its package name in AndroidMenifest.xml, rename directories from Android Studio, Changes Package name in all my class…
Dharmik
  • 2,325
  • 3
  • 27
  • 37
11
votes
2 answers

Android Package manager has died with TransactionTooLargeException

My app reads the list of all installed APK files, and then loop through the list to read the APK info, however it throws a TransactionTooLargeException exception. From what I have read here…
Ray
  • 16,025
  • 5
  • 31
  • 51
10
votes
2 answers

How to find the package name which has been uninstalled when using Intent.ACTION_PACKAGE_REMOVED

I have an application which is keeping a log of internally developed applications installed on the device. Upon installation a broadcast receiver for Intent.PACKAGE_ADDED is invoked and records the package name using the following code: public class…
1
2
3
37 38