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

Unpredictable behaviour caused by PackageManager.DONT_KILL_APP

The API docs of PackageManager.DONT_KILL_APP say: Be careful when you set this since changing component states can make the containing application's behavior unpredictable. Unfortunately they don't go into detail what they mean by unpredictable…
4
votes
2 answers

Change package manager application info meta data in android

I would like to change the value of a meta-data in the AndroidManifest.xml file : I am using the following code : ApplicationInfo applicationInfo = packageManager.getApplicationInfo( activity.getPackageName(),…
Julien
  • 157
  • 1
  • 2
  • 6
4
votes
3 answers

How do I read the Android Manifest without using PackageManager?

I am working on an Android application that requires more information than what is available in the PackageManager (such as intent filters). I have created a parser for reading the AndroidManifest file, but I cannot find the location of the…
4
votes
3 answers

Google play keeps asking me to remove REQUEST_INSTALL_PACKAGES, but my merged manifest does not have it

I get "Update Rejected" in Google Play console, stating that I need either remove REQUEST_INSTALL_PACKAGES permission or provide policy declaration for it. The thing is, I do not have this permissions nor in main, nor in merged…
4
votes
2 answers

What is a reason behind this "OnChecksumsReadyListener.onChecksumsReady" AbstractMethodError?

I received this exception on release build with Android 12. exception.class.missing._Unknown_: java.lang.AbstractMethodError abstract method "void android.content.pm.PackageManager$OnChecksumsReadyListener.onChecksumsReady(java.util.List)" at…
Bhoomika Patel
  • 1,895
  • 1
  • 13
  • 30
4
votes
1 answer

Getting Error -> all package the same library [androidx.activity:activity-ktx] in Android app

I have an application which has several dynamic modules , which are working fine . I recently updated compile sdk and target sdk to 31 . Now I want to add new dynamic module which has a external different application (aar file) and associated libs…
4
votes
1 answer

How to check if an intent can be handled on API 30+ (Android 10+, R)?

Below 30 API there were two methods I could use to check if intent can be handled by some app activity: fun Intent.canBeHandled(packageManager: PackageManager): Boolean { return resolveActivity(packageManager) != null } fun…
user924
  • 8,146
  • 7
  • 57
  • 139
4
votes
1 answer

Android tries to reference an old package name of a Broadcast receiver after OTA app update

I'm working on a custom AOSP 8.1 based OS. I have a system app (in /system/priv-app) with an exported broadcast receiver. This means it can accept Intents from outside the application. If I refactor the broadcast receiver, e.g. change its package…
4
votes
0 answers

Android - switch to last opened external app activity

I'm looking for a method to switch to the previously opened external app activity. I'm developing an app with a background service. there are many apps that has this function already as this one (LAS) getRecentTasks() is deprecated I found also this…
4
votes
3 answers

List return empty

I want to get diary use for all apps installed in phone, but always an empty list is returned. Below is the code i am using. Here app.js from react-native call apps information from native code java loadApps = async () => { await…
4
votes
3 answers

getApplicationIcon() via PackageManager return a white bar image placed in the center that isn't the actual app icon

after I invoke getApplicationIcon() like : context.getPackageManager().getApplicationIcon("com.cmcm.gamemaster"); it return this : a white bar image that placed in the middle. and always happen for specific application, the others in the installed…
VinceStyling
  • 3,707
  • 3
  • 29
  • 44
4
votes
1 answer

Android PackageStats gives always zero

I'm trying to get the size occupied by my application package. Every application has one location in the internal/external storage. I want to calculate the size of the following directory, how can I do that? I know I can use StorageStateManager on…
sam_k
  • 5,983
  • 14
  • 76
  • 110
4
votes
0 answers

How programmatically get URI for Deep Linking from Android manifest?

I need to send URI for Deep Link from Android manifest to the server - is it possible to get URL scheme programmatically? Or may be change Android manifest programmatically and add new scheme after app start. Thanks!
4
votes
1 answer

Launch an activity of an application from a different application on Android

I need to launch an activity (not the main activity) of an application from an application I have made. The activity I want to launch is proprietary, hence, I cannot make any changes to its code(or manifest). For example: I want to launch…
4
votes
0 answers

Failure to access DownloadManager's downloaded file on Android N

I have a system application with all the necessary permissions. previously, i would download apks using the DownloadManager and then use reflection via PackageManager's installPackage() to install said apk. unfortunately, following N's behaviour…