android.app.PackageInstallObserver Java Examples
The following examples show how to use
android.app.PackageInstallObserver.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 2 votes |
/** * @hide * * Install a package. Since this may take a little while, the result will * be posted back to the given observer. An installation will fail if the calling context * lacks the {@link android.Manifest.permission#INSTALL_PACKAGES} permission, if the * package named in the package file's manifest is already installed, or if there's no space * available on the device. * * @param packageURI The location of the package file to install. This can be a 'file:' or a * 'content:' URI. * @param observer An observer callback to get notified when the package installation is * complete. {@link PackageInstallObserver#packageInstalled(String, Bundle, int)} will be * called when that happens. This parameter must not be null. * @param flags - possible values: {@link #INSTALL_FORWARD_LOCK}, * {@link #INSTALL_REPLACE_EXISTING}, {@link #INSTALL_ALLOW_TEST}. * @param installerPackageName Optional package name of the application that is performing the * installation. This identifies which market the package came from. */ public abstract void installPackage( Uri packageURI, PackageInstallObserver observer, int flags, String installerPackageName);
Example #2
Source File: PackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 2 votes |
/** * Similar to * {@link #installPackage(Uri, IPackageInstallObserver, int, String)} but * with an extra verification file provided. * * @param packageURI The location of the package file to install. This can * be a 'file:' or a 'content:' URI. * @param observer An observer callback to get notified when the package installation is * complete. {@link PackageInstallObserver#packageInstalled(String, Bundle, int)} will be * called when that happens. This parameter must not be null. * @param flags - possible values: {@link #INSTALL_FORWARD_LOCK}, * {@link #INSTALL_REPLACE_EXISTING}, {@link #INSTALL_ALLOW_TEST}. * @param installerPackageName Optional package name of the application that * is performing the installation. This identifies which market * the package came from. * @param verificationURI The location of the supplementary verification * file. This can be a 'file:' or a 'content:' URI. May be * {@code null}. * @param manifestDigest an object that holds the digest of the package * which can be used to verify ownership. May be {@code null}. * @param encryptionParams if the package to be installed is encrypted, * these parameters describing the encryption and authentication * used. May be {@code null}. * @hide */ public abstract void installPackageWithVerification(Uri packageURI, PackageInstallObserver observer, int flags, String installerPackageName, Uri verificationURI, ManifestDigest manifestDigest, ContainerEncryptionParams encryptionParams);
Example #3
Source File: PackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 2 votes |
/** * Similar to * {@link #installPackage(Uri, IPackageInstallObserver, int, String)} but * with an extra verification information provided. * * @param packageURI The location of the package file to install. This can * be a 'file:' or a 'content:' URI. * @param observer An observer callback to get notified when the package installation is * complete. {@link PackageInstallObserver#packageInstalled(String, Bundle, int)} will be * called when that happens. This parameter must not be null. * @param flags - possible values: {@link #INSTALL_FORWARD_LOCK}, * {@link #INSTALL_REPLACE_EXISTING}, {@link #INSTALL_ALLOW_TEST}. * @param installerPackageName Optional package name of the application that * is performing the installation. This identifies which market * the package came from. * @param verificationParams an object that holds signal information to * assist verification. May be {@code null}. * @param encryptionParams if the package to be installed is encrypted, * these parameters describing the encryption and authentication * used. May be {@code null}. * * @hide */ public abstract void installPackageWithVerificationAndEncryption(Uri packageURI, PackageInstallObserver observer, int flags, String installerPackageName, VerificationParams verificationParams, ContainerEncryptionParams encryptionParams);
Example #4
Source File: PackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 2 votes |
/** * @hide * * Install a package. Since this may take a little while, the result will * be posted back to the given observer. An installation will fail if the calling context * lacks the {@link android.Manifest.permission#INSTALL_PACKAGES} permission, if the * package named in the package file's manifest is already installed, or if there's no space * available on the device. * * @param packageURI The location of the package file to install. This can be a 'file:' or a * 'content:' URI. * @param observer An observer callback to get notified when the package installation is * complete. {@link PackageInstallObserver#packageInstalled(String, Bundle, int)} will be * called when that happens. This parameter must not be null. * @param flags - possible values: {@link #INSTALL_FORWARD_LOCK}, * {@link #INSTALL_REPLACE_EXISTING}, {@link #INSTALL_ALLOW_TEST}. * @param installerPackageName Optional package name of the application that is performing the * installation. This identifies which market the package came from. */ public abstract void installPackage( Uri packageURI, PackageInstallObserver observer, int flags, String installerPackageName);
Example #5
Source File: PackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 2 votes |
/** * Similar to * {@link #installPackage(Uri, IPackageInstallObserver, int, String)} but * with an extra verification file provided. * * @param packageURI The location of the package file to install. This can * be a 'file:' or a 'content:' URI. * @param observer An observer callback to get notified when the package installation is * complete. {@link PackageInstallObserver#packageInstalled(String, Bundle, int)} will be * called when that happens. This parameter must not be null. * @param flags - possible values: {@link #INSTALL_FORWARD_LOCK}, * {@link #INSTALL_REPLACE_EXISTING}, {@link #INSTALL_ALLOW_TEST}. * @param installerPackageName Optional package name of the application that * is performing the installation. This identifies which market * the package came from. * @param verificationURI The location of the supplementary verification * file. This can be a 'file:' or a 'content:' URI. May be * {@code null}. * @param manifestDigest an object that holds the digest of the package * which can be used to verify ownership. May be {@code null}. * @param encryptionParams if the package to be installed is encrypted, * these parameters describing the encryption and authentication * used. May be {@code null}. * @hide */ public abstract void installPackageWithVerification(Uri packageURI, PackageInstallObserver observer, int flags, String installerPackageName, Uri verificationURI, ManifestDigest manifestDigest, ContainerEncryptionParams encryptionParams);
Example #6
Source File: PackageManager.java From AndroidComponentPlugin with Apache License 2.0 | 2 votes |
/** * Similar to * {@link #installPackage(Uri, IPackageInstallObserver, int, String)} but * with an extra verification information provided. * * @param packageURI The location of the package file to install. This can * be a 'file:' or a 'content:' URI. * @param observer An observer callback to get notified when the package installation is * complete. {@link PackageInstallObserver#packageInstalled(String, Bundle, int)} will be * called when that happens. This parameter must not be null. * @param flags - possible values: {@link #INSTALL_FORWARD_LOCK}, * {@link #INSTALL_REPLACE_EXISTING}, {@link #INSTALL_ALLOW_TEST}. * @param installerPackageName Optional package name of the application that * is performing the installation. This identifies which market * the package came from. * @param verificationParams an object that holds signal information to * assist verification. May be {@code null}. * @param encryptionParams if the package to be installed is encrypted, * these parameters describing the encryption and authentication * used. May be {@code null}. * * @hide */ public abstract void installPackageWithVerificationAndEncryption(Uri packageURI, PackageInstallObserver observer, int flags, String installerPackageName, VerificationParams verificationParams, ContainerEncryptionParams encryptionParams);