PackageInstaller.SessionParams.SetAppPackageName(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.
Optionally set the package name of the app being installed.
[Android.Runtime.Register("setAppPackageName", "(Ljava/lang/String;)V", "GetSetAppPackageName_Ljava_lang_String_Handler")]
public virtual void SetAppPackageName (string? appPackageName);
[<Android.Runtime.Register("setAppPackageName", "(Ljava/lang/String;)V", "GetSetAppPackageName_Ljava_lang_String_Handler")>]
abstract member SetAppPackageName : string -> unit
override this.SetAppPackageName : string -> unit
Parameters
- appPackageName
- String
- Attributes
Remarks
Optionally set the package name of the app being installed. It's strongly recommended that you provide this value when known, so that observers can communicate installing apps to users.
If the APKs staged in the session aren't consistent with this package name, the install will fail. Regardless of this value, all APKs in the app must have the same package name.
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.