Partager via


EventUrlProvider.CreateEventTrackingUrlWithResponse Method

Definition

Creates an event tracking URL that returns the provided response.

[Android.Runtime.Register("createEventTrackingUrlWithResponse", "(Landroid/os/PersistableBundle;[BLjava/lang/String;)Landroid/net/Uri;", "GetCreateEventTrackingUrlWithResponse_Landroid_os_PersistableBundle_arrayBLjava_lang_String_Handler", ApiSince=35)]
public virtual Android.Net.Uri CreateEventTrackingUrlWithResponse (Android.OS.PersistableBundle eventParams, byte[]? responseData, string? mimeType);
[<Android.Runtime.Register("createEventTrackingUrlWithResponse", "(Landroid/os/PersistableBundle;[BLjava/lang/String;)Landroid/net/Uri;", "GetCreateEventTrackingUrlWithResponse_Landroid_os_PersistableBundle_arrayBLjava_lang_String_Handler", ApiSince=35)>]
abstract member CreateEventTrackingUrlWithResponse : Android.OS.PersistableBundle * byte[] * string -> Android.Net.Uri
override this.CreateEventTrackingUrlWithResponse : Android.OS.PersistableBundle * byte[] * string -> Android.Net.Uri

Parameters

eventParams
PersistableBundle

The data to be passed to IsolatedWorker#onEvent(EventInput, android.os.OutcomeReceiver) when the event occurs.

responseData
Byte[]

The content to be returned to the WebView when the URL is fetched.

mimeType
String

The Mime Type of the URL response.

Returns

Uri

An ODP event URL that can be inserted into a WebView.

Attributes

Remarks

Creates an event tracking URL that returns the provided response. Returns HTTP Status 200 (OK) if the response data is not empty. Returns HTTP Status 204 (No Content) if the response data is empty.

Java documentation for android.adservices.ondevicepersonalization.EventUrlProvider.createEventTrackingUrlWithResponse(android.os.PersistableBundle, byte[], 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.

Applies to