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
2
votes
1 answer

Making an "Uninstall app" button in android?

I'm making a launcher application with an app drawer in a recyclerView, showing every currently installed app on the device. Long pressing the apps in the view shows a context menu, from which the user can uninstall an application. I simply have no…
2
votes
1 answer

Android PackageManager can only detect system apps on physical devices

When I run my app on certain physical devices, the Android PackageManager seems to only detect system apps. For example, I have the Facebook app installed, but calling PackageManager.getPackageInfo on com.facebook.katana results in a…
syhark
  • 35
  • 5
2
votes
1 answer

Dual apps in Android launcher

I'm creating an Android launcher. Some users have dual apps set up, e.g. for work (like WhatsApp with a dual sim). Now, I want to display both the default and dual instance of these apps, but only the default instance is showing (which makes sense…
2
votes
0 answers

Apk is disappearing after moving to system parition

I'm trying to install my apk on system partition. I've rooted device and here are the steps I'm following, adb install -d -r Now apk gets installed in /data/app// Move all contents present from /data/app/ to…
Tom Taylor
  • 3,344
  • 2
  • 38
  • 63
2
votes
2 answers

View intents meant for browser vs external app in Android

I'm building a basic web browser with the android webview component and recently added support for opening links in relevant external apps e.g. if you're on a page and click a youtube link, the youtube app is opened instead of navigating to the web…
2
votes
1 answer

How to check if an activity is associated with a metadata tag or not?

I've an activity which has a meta data tag associated with it.
Tom Taylor
  • 3,344
  • 2
  • 38
  • 63
2
votes
0 answers

Calling ApplicationInfo.loadLabel too many times leads to crash

I have a severe issue about getting the appName from all apps in the device - both systemapps and userapps. The problem arises if there's is too many - in my Samsung S7 userapps and systemapps sums up to 433. There seems to be a limit how many calls…
java
  • 1,165
  • 1
  • 25
  • 50
2
votes
1 answer

When to use application ID or package name a.k.a. is the PackageManager#getLaunchIntentForPackage method name incorrect?

When do I use 'application ID' or 'package'? (or is it 'package name'?) My confusion in a practical situation: One way to switch from one app to another is to get a launch intent for the app, which could be done using (given some…
Erik
  • 4,305
  • 3
  • 36
  • 54
2
votes
1 answer

Difference between disabling package vs disabling activity using package manager

The following answer shows an example of disabling an activity. But in few places I've seen disabling package completely. Disabling activity PackageManager pm = getPackageManager(); pm.setComponentEnabledSetting(new ComponentName(this, …
2
votes
2 answers

How to check if there's an app that can open a certain file

I'm currently stuck with this situation and there appears to be no question asked for this specific issue. I'm trying to open a .txt file after downloading and I want to check if the user has an app that will be able to open that file before…
Shadow
  • 4,168
  • 5
  • 41
  • 72
2
votes
0 answers

Check any sensor availability in Android: PackageManager vs SensorManager

I was reading about Sensors in Android and ways how to check their availability on the device. But I faced with kind of contradiction. Official Android Guide says that one should use SensorManager as follows: private SensorManager…
2
votes
0 answers

Android - make programmatically created broadcast receiver exported

I am trying to make my receiver that I statically defined in the manifest dynamic by creating it programmatically. That's the static version in the manifest:
phoebus
  • 1,280
  • 1
  • 16
  • 36
2
votes
2 answers

Gradle Flavour wise change packageName and applicationId

I have a core product (for example School core) Now I need to launch it for 2 school (example School A and School B). Only different is app icon splash screen. I try to manage this through flavour. As we know to upload to google play store we need…
2
votes
1 answer

How to get android:configChanges values from ActivityInfo class

I would like to fetch activities info(Such as configchanges, resizemode, if Picture in Picture is supported) of all the packages present in the device. I am able to fetch the activities info using PackageManager with GET_ACTIVITIES flag. With that I…
2
votes
1 answer

Get the package name of the app

So I am making an app in which I needed some features. I am getting the package name of all installed apps on my android device using this code: final PackageManager manager = getPackageManager(); List packages =…
Thomas
  • 121
  • 2
  • 12