Questions tagged [package-info]

PackageInfo class help developers to provide overall information about the contents of a package.

PackageInfo class help developers to provide overall information about the contents of a package. Information corresponds to all of the information collected from AndroidManifest.xml .

PackageInfo getPackageInfo (String packageName,int flags)

Retrieve overall information about an application package that is installed on the system.

Usually this class is used by PackageManager .

List<PackageInfo> getPackagesHoldingPermissions (String[] permissions, 
                                int flags)

Return a List of all installed packages that are currently holding any of the given permissions.

List<PackageInfo> getInstalledPackages (int flags)

Return a List of all packages that are installed on the device.

44 questions
55
votes
2 answers

Android 13 (SDK 33): PackageManager.getPackageInfo(String, int) deprecated. what is the alternative?

Starting from API level 33 the getPackageInfo(String, int) method of PackageManager class is deprecated. Documentation suggests to use getPackageInfo(String, PackageInfoFlags) instead. But that function is only available from API level 33. My…
Marat
  • 6,142
  • 6
  • 39
  • 67
52
votes
6 answers

Android SDK 28 - versionCode in PackageInfo has been deprecated

I just upgraded my app's compileSdkVersion to 28 (Pie). I'm getting a compilation warning: warning: [deprecation] versionCode in PackageInfo has been deprecated The warning is coming from this code: final PackageInfo info =…
Doron Yakovlev Golani
  • 5,188
  • 9
  • 36
  • 60
11
votes
3 answers

How to test a method that uses package_info in Flutter?

I am writing a Flutter plugin that checks the Play Store or App Store to see if the app needs to be updated. I'm using the package_info package to determine the version of the app that the user has. My code looks like this: getVersionStatus() { …
Tim Traversy
  • 432
  • 3
  • 9
9
votes
2 answers

Is there a way to create package-info.java for existing packages in one move in eclipse?

I have some legacy packages which doesn't have package-info.java. For some reason I need to create package-info.javas for them and I found the task really boring because there is no shortcut in eclipse for me to do that. I have to manually use the…
glee8e
  • 6,180
  • 4
  • 31
  • 51
7
votes
2 answers

Is there any way to detect to which apps I can/can't reach their "app-info" screen?

Background You can get a list of installed apps using PackageManager.getInstalledPackages. And, you can reach the app-info screen of each app via : val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
6
votes
0 answers

Get Only Installed Apps in the List ( Not the system apps )

I was implementing code to show only the user-installed apps (like facebook) and some updated_system_apps (like Gmail,youtube etc.) using the below code. But It is showing some other apps too. So my question is what is the way to remove these types…
Mayank Doda
  • 117
  • 2
  • 11
6
votes
2 answers

Multiple namespace package info Java

I have this package info /** * Created by mflamant on 13/02/2017. */ @javax.xml.bind.annotation.XmlSchema(namespace = "namespace1", xmlns = {@XmlNs(prefix = "ns4", namespaceURI = "namespace1")}, elementFormDefault = XmlNsForm.QUALIFIED) package…
Kraven
  • 245
  • 1
  • 3
  • 16
5
votes
0 answers

How to edit the default package-info template in eclipse

I just want when i creat new package and i check the Create package.info.java check box look like this @ParametersAreNonnullByDefault package net.pkg.main.foo; import javax.annotation.ParametersAreNonnullByDefault; but right now it just look like…
Abdelilah Elghazal
  • 61
  • 1
  • 1
  • 10
4
votes
2 answers

No implementation found for method getAll on channel dev.fluttercommunity.plus/package_info

I'm trying to debug a project for windows, and I'm having this problem: It runs and stops at Parse().initialize giving the error [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for…
4
votes
2 answers

@GenericGenerator in package-info.java not working JPA

I'm trying to add a Generator on package-info.java so that I don't have to re-write same code on top of every @Entity class. But when I try to run the program Application I get an error. Session Factory could not be…
A0__oN
  • 8,740
  • 6
  • 40
  • 61
4
votes
1 answer

package-info.java + Hibernate annotation @TypeDefs + Maven

How can I declare @TypeDefs on separate package-info.java class and use it package level with @Type. Currently I have declared it according to following manner. But when I compile the application with Maven it will give following error. Thanks.…
Channa
  • 4,963
  • 14
  • 65
  • 97
3
votes
0 answers

Is it possible to generate Javadoc pages for each level of a package?

I have a package in Java called foo.abc.xyz (name changed). The xyz level of the package has no source files, but it contains subpackages such as asdf and qwerty that do contain classes. I have a package-info.java file with a comment for that level…
3
votes
0 answers

Immutables-library generates the same immutable class twice

When using the immutables.io annotation processor in a multi-module android app, the build fails, when a package-info.java file is used. I've managed to build a minimal test-project on GitHub to reproduce the issue: ImmutablesPackageInfoIssue The…
TmTron
  • 17,012
  • 10
  • 94
  • 142
2
votes
0 answers

Can we get app version name without using package_info or any other dependency in flutter?

I want apps version info without using any dependency in case of decrease the size of my app.
Deepak
  • 21
  • 1
2
votes
2 answers

How to Check other apps are using accessibility (BIND_ACCESSIBILITY_SERVICE) permission or not in Android

how to check is there any app using accessibility permission(BIND_ACCESSIBILITY_SERVICE), or the name of applications which requested for the same along with its granted or not to them ? To detect that below apps are using accessibility…
1
2 3