PackageInstaller.Session.Transfer(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.
Transfer the session to a new owner.
[Android.Runtime.Register("transfer", "(Ljava/lang/String;)V", "GetTransfer_Ljava_lang_String_Handler", ApiSince=27)]
public virtual void Transfer (string packageName);
[<Android.Runtime.Register("transfer", "(Ljava/lang/String;)V", "GetTransfer_Ljava_lang_String_Handler", ApiSince=27)>]
abstract member Transfer : string -> unit
override this.Transfer : string -> unit
Parameters
- packageName
- String
The package of the new owner. Needs to hold the INSTALL_PACKAGES permission.
- Attributes
Remarks
Transfer the session to a new owner.
Only sessions that update the installing app can be transferred.
After the transfer to a package with a different uid all method calls on the session will cause SecurityException
s.
Once this method is called, the session is sealed and no additional mutations beside committing it may be performed on the session.
Java documentation for android.content.pm.PackageInstaller.Session.transfer(java.lang.String)
.
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.