다음을 통해 공유


OnDevicePersonalizationManager.RequestSurfacePackage Method

Definition

Requests a android.view.SurfaceControlViewHost.SurfacePackage to be inserted into a android.view.SurfaceView inside the calling app.

[Android.Runtime.Register("requestSurfacePackage", "(Landroid/adservices/ondevicepersonalization/SurfacePackageToken;Landroid/os/IBinder;IIILjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetRequestSurfacePackage_Landroid_adservices_ondevicepersonalization_SurfacePackageToken_Landroid_os_IBinder_IIILjava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=35)]
public virtual void RequestSurfacePackage (Android.AdServices.OnDevicePersonalization.SurfacePackageToken surfacePackageToken, Android.OS.IBinder surfaceViewHostToken, int displayId, int width, int height, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver receiver);
[<Android.Runtime.Register("requestSurfacePackage", "(Landroid/adservices/ondevicepersonalization/SurfacePackageToken;Landroid/os/IBinder;IIILjava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetRequestSurfacePackage_Landroid_adservices_ondevicepersonalization_SurfacePackageToken_Landroid_os_IBinder_IIILjava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=35)>]
abstract member RequestSurfacePackage : Android.AdServices.OnDevicePersonalization.SurfacePackageToken * Android.OS.IBinder * int * int * int * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.RequestSurfacePackage : Android.AdServices.OnDevicePersonalization.SurfacePackageToken * Android.OS.IBinder * int * int * int * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

surfacePackageToken
SurfacePackageToken

a reference to a SurfacePackageToken returned by a prior call to #execute(ComponentName, PersistableBundle, Executor, OutcomeReceiver).

surfaceViewHostToken
IBinder

the hostToken of the android.view.SurfaceView, which is returned by android.view.SurfaceView#getHostToken() after the android.view.SurfaceView has been added to the view hierarchy.

displayId
Int32

the integer ID of the logical display on which to display the android.view.SurfaceControlViewHost.SurfacePackage, returned by Context.getDisplay().getDisplayId().

width
Int32

the width of the android.view.SurfaceControlViewHost.SurfacePackage in pixels.

height
Int32

the height of the android.view.SurfaceControlViewHost.SurfacePackage in pixels.

executor
IExecutor

the Executor on which to invoke the callback

receiver
IOutcomeReceiver

This either returns a android.view.SurfaceControlViewHost.SurfacePackage on success, or Exception on failure. The exception type is OnDevicePersonalizationException if execution of the handler fails.

Attributes

Remarks

Requests a android.view.SurfaceControlViewHost.SurfacePackage to be inserted into a android.view.SurfaceView inside the calling app. The surface package will contain an android.view.View with the content from a result of a prior call to #execute(ComponentName, PersistableBundle, Executor, OutcomeReceiver) running in the OnDevicePersonalization sandbox.

Java documentation for android.adservices.ondevicepersonalization.OnDevicePersonalizationManager.requestSurfacePackage(android.adservices.ondevicepersonalization.SurfacePackageToken, android.os.IBinder, int, int, int, java.util.concurrent.Executor, android.os.OutcomeReceiver<android.view.SurfaceControlViewHost.SurfacePackage, java.lang.Exception>).

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.

Applies to