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
2
votes
0 answers

How is package-info.java shared between main and test in a maven project?

In a maven project, I created a simple Unit test which loads all classes within a given root package, iterates over them and processes some information about their packages (namely whether a specific annotation is provided for a given…
Andy
  • 1,127
  • 2
  • 12
  • 25
2
votes
2 answers

Flutter - Get app version in iOS using package_info

I need to retrieve the app version from within Dart code in a Flutter project. I am using package_info and in Android is working OK but in iOS the version property in PackageInfo is null. My code: Future getVersion() async { String…
svprdga
  • 2,171
  • 1
  • 28
  • 51
2
votes
2 answers

JAXB package-info.java declarations are ignored in separate maven modul

I use package-info.java to specify @XmlAccessorType(XmlAccessType.NONE) and some xml java adapters using @XmlJavaTypeAdapters. Model objects (with JAXB annotations) are placed in separate maven module shared by other modules. The configuration in…
Pavla Nováková
  • 796
  • 4
  • 11
1
vote
0 answers

Detect package-info in Java Annotation Processor

I'm writing a Java annotation processor that creates package-info for packages in a Java project. The code to actually generate the source file looks somewhat like this: JavaFileObject builderFile = filer.createSourceFile(packageName +…
Marten
  • 3,802
  • 1
  • 17
  • 26
1
vote
1 answer

How to access Flutter plugin pubspec.yaml programatically?

Lots of questions regarding how to access the pubspec.yaml, but only solutions for Flutter apps. This questions targets Flutter plugins for which a package like package_info_plus will not return the version from pubspec.yaml, but rather from the…
1
vote
2 answers

R - How to get/print description of the variables in a dataset loaded from any package / library (eg: ISLR)?

Is there a function that can print the description / detailed info (what does a variable represent, what are it's units etc.) about the variables that are part of a dataset loaded from a library or package? Note: I am using jupyter notebook. Is…
rahul-ahuja
  • 1,166
  • 1
  • 12
  • 24
1
vote
1 answer

jaxb2-maven-plugin not generating package-info.java

for all given XSDs, the jaxb2-maven-plugin does not generate the package-info.java file. (it only generates the classes). We still use Java 1.8 My pom looks like this: org.codehaus.mojo
Walter Kuhn
  • 479
  • 1
  • 6
  • 19
1
vote
0 answers

Why declared immuables library style in package-info.java doesn't apply for subpackages in java 9 project?

Please see https://github.com/originalrusyn/java9_immutables for more details So, the following config works correctly with sourceCompatibility = 1.8 p.package-info.java @Value.Style( defaults = @Value.Immutable(copy = false), strictBuilder…
1
vote
0 answers

Why does the package-info.java file affect annotation-processing?

Adding a package-info.java file to the project, causes annotation-processors to create different output. I don't understand why this happens. I think adding the package-info.java file should not affect my build at all, because it does not contain…
TmTron
  • 17,012
  • 10
  • 94
  • 142
1
vote
2 answers

How to exclude package-info.java files from dex?

I have a multi-module Android application and when I build the release APK, I get this dex error: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/XX/package-info; I do of course have a…
TmTron
  • 17,012
  • 10
  • 94
  • 142
1
vote
1 answer

ActivityInfo[] is null for PackageManager.getInstalledPackages()

Trying to retrieve all activities for each package results in null ActivityInfo array for all of them: List packageInfos = mPackageManager.getInstalledPackages( PackageManager.GET_ACTIVITIES & …
BamsBamx
  • 4,139
  • 4
  • 38
  • 63
1
vote
1 answer

PackageInfo versionName now says INSTANT_RUN

It appears that Android Studio 2.2 Preview 4 substitutes "INSTANT_RUN" for the versionName in PackageInfo rather than what has been put in the manifest. Is there any other way of seeing what is in versionName in the manifest? The code I am using…
jrisch
  • 132
  • 1
  • 9
1
vote
2 answers

Using package-info.java for JAXB

I am unable to build my application because of the syntax in the package-info.java file. The sample below is just a demo but any sample I try gives me the syntax errors I would expect since I'm placing code before the package and imports. How…
Usman Mutawakil
  • 4,993
  • 9
  • 43
  • 80
1
vote
1 answer

Some questions about "DONT_DELETE_DATA" , how it works, and how do apps use it

Background I'm developing an app-manager app, and I've noticed that there is a way to get a list of "uninstalled apps" (using "GET_UNINSTALLED_PACKAGES" flag) , which are apps that requested to avoid removal of their data upon uninstallation…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
1
vote
1 answer

JAXB unmarshall xml without package-info.java

JAXB unmarshaller throws exception if there is no package-info.java file. This code is called from another language and custom classloader can not load package-info properly. I had already manually added the namespace parameter to all the…
Artems
  • 75
  • 2
  • 9