Share via


ContentResolver.Refresh(Uri, Bundle, CancellationSignal) Method

Definition

This allows clients to request an explicit refresh of content identified by uri.

[Android.Runtime.Register("refresh", "(Landroid/net/Uri;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Z", "", ApiSince=26)]
public bool Refresh (Android.Net.Uri url, Android.OS.Bundle? extras, Android.OS.CancellationSignal? cancellationSignal);
[<Android.Runtime.Register("refresh", "(Landroid/net/Uri;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Z", "", ApiSince=26)>]
member this.Refresh : Android.Net.Uri * Android.OS.Bundle * Android.OS.CancellationSignal -> bool

Parameters

url
Uri

The Uri identifying the data to refresh.

extras
Bundle

Additional options from the client. The definitions of these are specific to the content provider being called.

cancellationSignal
CancellationSignal

A signal to cancel the operation in progress, or null if none. For example, if you called refresh on a particular uri, you should call CancellationSignal#throwIfCanceled() to check whether the client has canceled the refresh request.

Returns

true if the provider actually tried refreshing.

Attributes

Remarks

This allows clients to request an explicit refresh of content identified by uri.

Client code should only invoke this method when there is a strong indication (such as a user initiated pull to refresh gesture) that the content is stale.

Java documentation for android.content.ContentResolver.refresh(android.net.Uri, android.os.Bundle, android.os.CancellationSignal).

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