PeopleContract.Directory.RequestRefresh(Context, CancellationSignal) 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.
Requests the system to refresh cached records across all registered People Directories.
[Android.Runtime.Register("requestRefresh", "(Landroid/content/Context;Landroid/os/CancellationSignal;)Z", "", ApiSince=37)]
public static bool RequestRefresh(Android.Content.Context context, Android.OS.CancellationSignal? cancellationSignal);
[<Android.Runtime.Register("requestRefresh", "(Landroid/content/Context;Landroid/os/CancellationSignal;)Z", "", ApiSince=37)>]
static member RequestRefresh : Android.Content.Context * Android.OS.CancellationSignal -> bool
Parameters
- context
- Context
The Context used to access the ContentResolver.
- cancellationSignal
- CancellationSignal
An optional CancellationSignal to cancel the refresh
request, or null.
Returns
true if the refresh request was successfully accepted, false if
the calling package is not a registered People Directory or the request could not be
processed.
- Attributes
Remarks
Requests the system to refresh records in the local database across all registered People Directories.
For People Directory applications: People Directory applications can call this method after significant, large-scale state changes (such as completing an initial account synchronization or resetting database storage) to prompt the system to schedule a package-level refresh job to rebuild directory records in its local database. This method must be invoked by the application package that owns the directory provider.
This method is an expensive operation and should not be used as a general alternative to notifyChange(Context,Uri,Bundle,CancellationSignal) for incremental changes.
Note that this request acts as a hint to the system; the exact timing and execution of database updates depend on system conditions such as available memory and overall device state, and immediate execution is not guaranteed.
For client applications: Clients do not invoke this method.
Android reference for android.provider.PeopleContract.Directory.requestRefresh.
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.