Partager via


IsolatedService.GetRemoteData(RequestToken) Method

Definition

Returns a Data Access Object for the REMOTE_DATA table.

[Android.Runtime.Register("getRemoteData", "(Landroid/adservices/ondevicepersonalization/RequestToken;)Landroid/adservices/ondevicepersonalization/KeyValueStore;", "", ApiSince=35)]
public Android.AdServices.OnDevicePersonalization.IKeyValueStore GetRemoteData (Android.AdServices.OnDevicePersonalization.RequestToken requestToken);
[<Android.Runtime.Register("getRemoteData", "(Landroid/adservices/ondevicepersonalization/RequestToken;)Landroid/adservices/ondevicepersonalization/KeyValueStore;", "", ApiSince=35)>]
member this.GetRemoteData : Android.AdServices.OnDevicePersonalization.RequestToken -> Android.AdServices.OnDevicePersonalization.IKeyValueStore

Parameters

requestToken
RequestToken

an opaque token that identifies the current request to the service.

Returns

A KeyValueStore object that provides access to the REMOTE_DATA table. The methods in the returned KeyValueStore are blocking operations and should be called from a worker thread and not the main thread or a binder thread.

Attributes

Remarks

Returns a Data Access Object for the REMOTE_DATA table. The REMOTE_DATA table is a read-only key-value store that contains data that is periodically downloaded from an endpoint declared in the <download> tag in the ODP manifest of the service, as shown in the following example.

{@code
<!-- Contents of res/xml/OdpSettings.xml -->
<on-device-personalization>
<!-- Name of the service subclass -->
<service "com.example.odpsample.SampleService">
<!-- If this tag is present, ODP will periodically poll this URL and
               download content to populate REMOTE_DATA. Adopters that do not need to
               download content from their servers can skip this tag. -->
<download-settings url="https://example.com/get" />
</service>
</on-device-personalization>
            }

Java documentation for android.adservices.ondevicepersonalization.IsolatedService.getRemoteData(android.adservices.ondevicepersonalization.RequestToken).

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