ArchivedPackageInfo


public final class ArchivedPackageInfo
extends Object

java.lang.Object
   ↳ android.content.pm.ArchivedPackageInfo


Contains fields required for archived package installation, i.e. installation without an APK.

Summary

Public constructors

ArchivedPackageInfo(String packageName, SigningInfo signingInfo, List<ArchivedActivityInfo> launcherActivities)

Public methods

String getDefaultToDeviceProtectedStorage()

Package data will default to device protected storage.

List<ArchivedActivityInfo> getLauncherActivities()

List of the package's activities that specify Intent.ACTION_MAIN and Intent.CATEGORY_LAUNCHER.

String getPackageName()

Name of the package as used to identify it in the system

String getRequestLegacyExternalStorage()

If true this app would like to run under the legacy storage model.

SigningInfo getSigningInfo()

Signing certificates used to sign the package.

int getTargetSdkVersion()

This is the SDK version number that the application is targeting, as specified by the <manifest> tag's R.styleable.AndroidManifestUsesSdk_targetSdkVersion attribute.

String getUserDataFragile()

If true the user is prompted to keep the app's data on uninstall.

int getVersionCode()

The version number of the package, as specified by the <manifest>tag's versionCode attribute.

int getVersionCodeMajor()

The major version number of the package, as specified by the <manifest>tag's versionCodeMajor attribute.

ArchivedPackageInfo setDefaultToDeviceProtectedStorage(String value)

Package data will default to device protected storage.

ArchivedPackageInfo setLauncherActivities(List<ArchivedActivityInfo> value)

List of the package's activities that specify Intent.ACTION_MAIN and Intent.CATEGORY_LAUNCHER.

ArchivedPackageInfo setPackageName(String value)

Name of the package as used to identify it in the system

ArchivedPackageInfo setRequestLegacyExternalStorage(String value)

If true this app would like to run under the legacy storage model.

ArchivedPackageInfo setSigningInfo(SigningInfo value)

Signing certificates used to sign the package.

ArchivedPackageInfo setTargetSdkVersion(int value)

This is the SDK version number that the application is targeting, as specified by the <manifest> tag's R.styleable.AndroidManifestUsesSdk_targetSdkVersion attribute.

ArchivedPackageInfo setUserDataFragile(String value)

If true the user is prompted to keep the app's data on uninstall.

ArchivedPackageInfo setVersionCode(int value)

The version number of the package, as specified by the <manifest>tag's versionCode attribute.

ArchivedPackageInfo setVersionCodeMajor(int value)

The major version number of the package, as specified by the <manifest>tag's versionCodeMajor attribute.

Inherited methods

Public constructors

ArchivedPackageInfo

Added in API level 35
public ArchivedPackageInfo (String packageName, 
                SigningInfo signingInfo, 
                List<ArchivedActivityInfo> launcherActivities)

Parameters
packageName String: This value cannot be null.

signingInfo SigningInfo: This value cannot be null.

launcherActivities List: This value cannot be null.

Public methods

getDefaultToDeviceProtectedStorage

Added in API level 35
public String getDefaultToDeviceProtectedStorage ()

Package data will default to device protected storage. Specified by the <manifest> tag's R.styleable.AndroidManifestApplication_defaultToDeviceProtectedStorage attribute.

Returns
String This value may be null.

getLauncherActivities

Added in API level 35
public List<ArchivedActivityInfo> getLauncherActivities ()

List of the package's activities that specify Intent.ACTION_MAIN and Intent.CATEGORY_LAUNCHER.

Returns
List<ArchivedActivityInfo> This value cannot be null.

getPackageName

Added in API level 35
public String getPackageName ()

Name of the package as used to identify it in the system

Returns
String This value cannot be null.

getRequestLegacyExternalStorage

Added in API level 35
public String getRequestLegacyExternalStorage ()

If true this app would like to run under the legacy storage model. Specified by the <manifest> tag's R.styleable.AndroidManifestApplication_requestLegacyExternalStorage attribute.

Returns
String This value may be null.

getSigningInfo

Added in API level 35
public SigningInfo getSigningInfo ()

Signing certificates used to sign the package.

Returns
SigningInfo This value cannot be null.

getTargetSdkVersion

Added in API level 35
public int getTargetSdkVersion ()

This is the SDK version number that the application is targeting, as specified by the <manifest> tag's R.styleable.AndroidManifestUsesSdk_targetSdkVersion attribute.

Returns
int

getUserDataFragile

Added in API level 35
public String getUserDataFragile ()

If true the user is prompted to keep the app's data on uninstall. Specified by the <manifest> tag's R.styleable.AndroidManifestApplication_hasFragileUserData attribute.

Returns
String This value may be null.

getVersionCode

Added in API level 35
public int getVersionCode ()

The version number of the package, as specified by the <manifest>tag's versionCode attribute.

Returns
int

getVersionCodeMajor

Added in API level 35
public int getVersionCodeMajor ()

The major version number of the package, as specified by the <manifest>tag's versionCodeMajor attribute.

Returns
int

setDefaultToDeviceProtectedStorage

Added in API level 35
public ArchivedPackageInfo setDefaultToDeviceProtectedStorage (String value)

Package data will default to device protected storage. Specified by the <manifest> tag's R.styleable.AndroidManifestApplication_defaultToDeviceProtectedStorage attribute.

Parameters
value String: This value cannot be null.

Returns
ArchivedPackageInfo This value cannot be null.

setLauncherActivities

Added in API level 35
public ArchivedPackageInfo setLauncherActivities (List<ArchivedActivityInfo> value)

List of the package's activities that specify Intent.ACTION_MAIN and Intent.CATEGORY_LAUNCHER.

Parameters
value List: This value cannot be null.

Returns
ArchivedPackageInfo This value cannot be null.

setPackageName

Added in API level 35
public ArchivedPackageInfo setPackageName (String value)

Name of the package as used to identify it in the system

Parameters
value String: This value cannot be null.

Returns
ArchivedPackageInfo This value cannot be null.

setRequestLegacyExternalStorage

Added in API level 35
public ArchivedPackageInfo setRequestLegacyExternalStorage (String value)

If true this app would like to run under the legacy storage model. Specified by the <manifest> tag's R.styleable.AndroidManifestApplication_requestLegacyExternalStorage attribute.

Parameters
value String: This value cannot be null.

Returns
ArchivedPackageInfo This value cannot be null.

setSigningInfo

Added in API level 35
public ArchivedPackageInfo setSigningInfo (SigningInfo value)

Signing certificates used to sign the package.

Parameters
value SigningInfo: This value cannot be null.

Returns
ArchivedPackageInfo This value cannot be null.

setTargetSdkVersion

Added in API level 35
public ArchivedPackageInfo setTargetSdkVersion (int value)

This is the SDK version number that the application is targeting, as specified by the <manifest> tag's R.styleable.AndroidManifestUsesSdk_targetSdkVersion attribute.

Parameters
value int

Returns
ArchivedPackageInfo This value cannot be null.

setUserDataFragile

Added in API level 35
public ArchivedPackageInfo setUserDataFragile (String value)

If true the user is prompted to keep the app's data on uninstall. Specified by the <manifest> tag's R.styleable.AndroidManifestApplication_hasFragileUserData attribute.

Parameters
value String: This value cannot be null.

Returns
ArchivedPackageInfo This value cannot be null.

setVersionCode

Added in API level 35
public ArchivedPackageInfo setVersionCode (int value)

The version number of the package, as specified by the <manifest>tag's versionCode attribute.

Parameters
value int

Returns
ArchivedPackageInfo This value cannot be null.

setVersionCodeMajor

Added in API level 35
public ArchivedPackageInfo setVersionCodeMajor (int value)

The major version number of the package, as specified by the <manifest>tag's versionCodeMajor attribute.

Parameters
value int

Returns
ArchivedPackageInfo This value cannot be null.