PackageInstaller.SessionParams.SetInstallerPackageName(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Set the installer package for the app.
[Android.Runtime.Register("setInstallerPackageName", "(Ljava/lang/String;)V", "GetSetInstallerPackageName_Ljava_lang_String_Handler", ApiSince=34)]
public virtual void SetInstallerPackageName (string? installerPackageName);
[<Android.Runtime.Register("setInstallerPackageName", "(Ljava/lang/String;)V", "GetSetInstallerPackageName_Ljava_lang_String_Handler", ApiSince=34)>]
abstract member SetInstallerPackageName : string -> unit
override this.SetInstallerPackageName : string -> unit
Parameters
- installerPackageName
- String
The name of the installer package, its length must be less
than 255
, otherwise it will be invalid.
- Attributes
Remarks
Set the installer package for the app.
By default this is the app that created the PackageInstaller
object.
Note: Only applications with android.Manifest.permission#INSTALL_PACKAGES
permission are allowed to set an installer that is not the caller's own installer package name, otherwise it will cause a SecurityException
when creating the install session.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.