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
130
votes
15 answers

What does this mean: Failure [INSTALL_FAILED_CONTAINER_ERROR]?

I try to deploy my app and sometimes get this error: Failure [INSTALL_FAILED_CONTAINER_ERROR] I tried to google it but don't find what the error means or what it's caused by. I deploy via IDE (IntelliJ) the file gets copied to the device to…
Mathias Conradt
  • 28,420
  • 21
  • 138
  • 192
96
votes
18 answers

Fully change package name including company domain

Let's suppose this is the package name: package com.company.name. How do I change company? P.S. I saw how to change name but not company. I'm using Android Studio.
Filip Luchianenco
  • 6,912
  • 9
  • 41
  • 63
74
votes
6 answers

Android hide/unhide app icon programmatically

i had used below code for hide app icon programmatically try{ PackageManager p = getPackageManager(); p.setComponentEnabledSetting(getComponentName(), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); }catch…
PankajAndroid
  • 2,689
  • 3
  • 27
  • 41
52
votes
2 answers

How to get information of an APK file in the file system (not just installed ones) without using File or file-path?

Background My app (here) can search for APK files throughout the file system (not just of installed apps), showing information about each, allowing to delete, share, install... As part of the scoped-storage feature on Android Q, Google announced…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
49
votes
4 answers

How to update Gradle dependencies to their latest version

Is there an easy way to get gradle to update dependencies to their latest available version? For build reproducibility all my dependencies are defined with a version number like this in my build.gradle file: dependencies { compile…
38
votes
4 answers

How to Enable Android Download Manager

I'm using Android Download Manager to download list of files. Lately I came across a crash report saying Unknown java.lang.IllegalArgumentException: Unknown URL content://downloads/my_downloads Then later, I figured it out that the reason is…
34
votes
5 answers

Get icons of all installed apps in android

I want to get icons of my all installed apps. Can I get that icons using package manager? Is there any function for it? Or any other way to get icons of all installed apps in bitmap? Thanks!
Jai
  • 1,974
  • 2
  • 22
  • 42
33
votes
5 answers

Android: How to get a list of installed activities, as they appear in launcher, without duplicates

I am writing an app that allows user to view the list of installed apps, select one of them and then start it on schedule. Using tutorials from stackoverflow i managed to figure out how to get a list of installed activities, their package names and…
Anton Cherkashyn
  • 5,719
  • 6
  • 43
  • 80
27
votes
5 answers

Get list of apps of all users

If I want to retrieve an ApplicationInfo list for all apps of the current user, I can just run: PackageManager pkgmanager = ctx.getPackageManager(); List installedApps =…
23
votes
3 answers

How to check if an Activity is enabled?

Background I'm trying to check if an activity (or any other app component type, for that matter) is enabled/disabled at runtime. The problem It's possible to use the next code: final ComponentName componentName = new ComponentName(context,…
23
votes
4 answers

Can PackageManager.getInstallerPackageName() tell me that my app was installed from Amazon app store?

I plan on publishing my app on Amazon app store as well as Google Play, and have some things in my app that need to behave slightly different depending on whether the app was installed from Amazon app store or not. If I understood the…
Adil Hussain
  • 30,049
  • 21
  • 112
  • 147
21
votes
1 answer

Difference between adb "install" command and "pm install" command?

What's the difference between installing an app using the install command and using the package manager's pm install command? Do they do the exact same job? Does one command actually call the other in the back? adb install -r APK_FILE adb shell pm…
hackjutsu
  • 8,336
  • 13
  • 47
  • 87
19
votes
2 answers

Difference between ApplicationInfo and PackageInfo?

I have several general question about ApplicationInfo and PackageInfo classes. Here they are: Can someone describe the difference between ApplicationInfo and PackageInfo? How do they correlate with each other? In which cases ApplicationInfo is used…
Yury
  • 20,618
  • 7
  • 58
  • 86
18
votes
4 answers

How to programmatically set a lock or pin for an app

So right now I am trying to develop an Android App for my young children. I want to set a pin or passwords on selected applications for a particular amount of time to prevent them from opening the app. For example, let's say that my daughter wants…
18
votes
6 answers

hasSystemFeature(PackageManager.FEATURE_CAMERA) returns true for device with no camera

I have a application which uses camera functionality in it but part of its functionality can also run without camera feature. SO I have put this in my manifest.
Yogesh D
  • 1,663
  • 2
  • 23
  • 38
1
2 3
37 38