ContentResolver ContentResolver Class

Definition

This class provides applications access to the content model.

[Android.Runtime.Register("android/content/ContentResolver", ApiSince=1, DoNotGenerateAcw=true)]
public abstract class ContentResolver : Java.Lang.Object
type ContentResolver = class
    inherit Object
Inheritance
ContentResolverContentResolver
Derived
Attributes

Remarks

Android platform documentation

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.

Constructors

ContentResolver(Context) ContentResolver(Context)
ContentResolver(IntPtr, JniHandleOwnership) ContentResolver(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Fields

AnyCursorItemType AnyCursorItemType

This is the Android platform's generic MIME type to match any MIME type of the form "CursorItemBaseType/SUB_TYPE".

CursorDirBaseType CursorDirBaseType

This is the Android platform's base MIME type for a content: URI containing a Cursor of zero or more items.

CursorItemBaseType CursorItemBaseType

This is the Android platform's base MIME type for a content: URI containing a Cursor of a single item.

ExtraHonoredArgs ExtraHonoredArgs
ExtraRefreshSupported ExtraRefreshSupported
ExtraSize ExtraSize

An extra Point describing the optimal size for a requested image resource, in pixels.

ExtraTotalCount ExtraTotalCount
NotifySkipNotifyForDescendants NotifySkipNotifyForDescendants
NotifySyncToNetwork NotifySyncToNetwork
QueryArgLimit QueryArgLimit
QueryArgOffset QueryArgOffset
QueryArgSortCollation QueryArgSortCollation
QueryArgSortColumns QueryArgSortColumns
QueryArgSortDirection QueryArgSortDirection
QueryArgSqlSelection QueryArgSqlSelection
QueryArgSqlSelectionArgs QueryArgSqlSelectionArgs
QueryArgSqlSortOrder QueryArgSqlSortOrder
QuerySortDirectionAscending QuerySortDirectionAscending
QuerySortDirectionDescending QuerySortDirectionDescending
SchemeAndroidResource SchemeAndroidResource
SchemeContent SchemeContent
SchemeFile SchemeFile
SyncExtrasAccount SyncExtrasAccount
SyncExtrasDiscardLocalDeletions SyncExtrasDiscardLocalDeletions

Indicates that the sync adapter should not proceed with the delete operations, if it determines that there are too many.

SyncExtrasDoNotRetry SyncExtrasDoNotRetry

If this extra is set to true then the request will not be retried if it fails.

SyncExtrasExpedited SyncExtrasExpedited

If this extra is set to true, the sync request will be scheduled at the front of the sync request queue and without any delay

SyncExtrasForce SyncExtrasForce
SyncExtrasIgnoreBackoff SyncExtrasIgnoreBackoff

If this extra is set to true then any backoffs for the initial attempt (e.g. due to retries) are ignored by the sync scheduler.

SyncExtrasIgnoreSettings SyncExtrasIgnoreSettings

If this extra is set to true then the sync settings (like getSyncAutomatically()) are ignored by the sync scheduler.

SyncExtrasInitialize SyncExtrasInitialize

Set by the SyncManager to request that the SyncAdapter initialize itself for the given account/authority pair.

SyncExtrasManual SyncExtrasManual

Setting this extra is the equivalent of setting both SyncExtrasIgnoreSettings and SyncExtrasIgnoreBackoff

SyncExtrasOverrideTooManyDeletions SyncExtrasOverrideTooManyDeletions

Indicates that the sync adapter should proceed with the delete operations, even if it determines that there are too many.

SyncExtrasRequireCharging SyncExtrasRequireCharging
SyncExtrasUpload SyncExtrasUpload

Indicates that this sync is intended to only upload local changes to the server.

SyncObserverTypeActive SyncObserverTypeActive
SyncObserverTypePending SyncObserverTypePending
SyncObserverTypeSettings SyncObserverTypeSettings

Properties

Class Class

Returns the unique instance of Class that represents this object's class.

(Inherited from Object)
CurrentSync CurrentSync

If a sync is active returns the information about it, otherwise returns null.

CurrentSyncs CurrentSyncs

Returns a list with information about all the active syncs.

Handle Handle

The handle to the underlying Android instance.

(Inherited from Object)
IJavaObjectEx.IsProxy IJavaObjectEx.IsProxy Inherited from Object
IJavaObjectEx.KeyHandle IJavaObjectEx.KeyHandle Inherited from Object
IJavaObjectEx.NeedsActivation IJavaObjectEx.NeedsActivation Inherited from Object
IJavaPeerable.JniManagedPeerState IJavaPeerable.JniManagedPeerState Inherited from Object
JniIdentityHashCode JniIdentityHashCode Inherited from Object
JniPeerMembers JniPeerMembers
MasterSyncAutomatically MasterSyncAutomatically

Gets the master auto-sync setting that applies to all the providers and accounts.

OutgoingPersistedUriPermissions OutgoingPersistedUriPermissions

Return list of all persisted URI permission grants that are hosted by the calling app.

PeerReference PeerReference Inherited from Object
PersistedUriPermissions PersistedUriPermissions

Return list of all URI permission grants that have been persisted by the calling app.

ThresholdClass ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

AcquireContentProviderClient(String) AcquireContentProviderClient(String)

Returns a ContentProviderClient that is associated with the ContentProvider with the authority of name, starting the provider if necessary.

AcquireContentProviderClient(Uri) AcquireContentProviderClient(Uri)

Returns a ContentProviderClient that is associated with the ContentProvider that services the content at uri, starting the provider if necessary.

AcquireUnstableContentProviderClient(String) AcquireUnstableContentProviderClient(String)

Like AcquireContentProviderClient(String), but for use when you do not trust the stability of the target content provider.

AcquireUnstableContentProviderClient(Uri) AcquireUnstableContentProviderClient(Uri)

Like AcquireContentProviderClient(Uri), but for use when you do not trust the stability of the target content provider.

AddPeriodicSync(Account, String, Bundle, Int64) AddPeriodicSync(Account, String, Bundle, Int64)

Specifies that a sync should be requested with the specified the account, authority, and extras at the given frequency.

AddStatusChangeListener(SyncObserverType, ISyncStatusObserver) AddStatusChangeListener(SyncObserverType, ISyncStatusObserver)

Request notifications when the different aspects of the SyncManager change.

ApplyBatch(String, IList<ContentProviderOperation>) ApplyBatch(String, IList<ContentProviderOperation>)
BulkInsert(Uri, ContentValues[]) BulkInsert(Uri, ContentValues[])

Inserts multiple rows into a table at the given URL.

Call(Uri, String, String, Bundle) Call(Uri, String, String, Bundle)

Call a provider-defined method.

CancelSync(Account, String) CancelSync(Account, String)

Cancel any active or pending syncs that match account and authority.

CancelSync(SyncRequest) CancelSync(SyncRequest)

Remove the specified sync.

CancelSync(Uri) CancelSync(Uri)

Cancel any active or pending syncs that match the Uri.

Canonicalize(Uri) Canonicalize(Uri)

url

Clone() Clone()

Creates and returns a copy of this Object.

(Inherited from Object)
Delete(Uri, String, String[]) Delete(Uri, String, String[])

Deletes row(s) specified by a content URI.

Dispose() Dispose() Inherited from Object
Dispose(Boolean) Dispose(Boolean) Inherited from Object
Equals(Object) Equals(Object)

Compares this instance with the specified object and indicates if they are equal.

(Inherited from Object)
GetHashCode() GetHashCode()

Returns an integer hash code for this object.

(Inherited from Object)
GetIsSyncable(Account, String) GetIsSyncable(Account, String)

Check if this account/provider is syncable.

GetPeriodicSyncs(Account, String) GetPeriodicSyncs(Account, String)

Get the list of information about the periodic syncs for the given account and authority.

GetStreamTypes(Uri, String) GetStreamTypes(Uri, String)
GetSyncAdapterTypes() GetSyncAdapterTypes()

Get information about the SyncAdapters that are known to the system.

GetSyncAutomatically(Account, String) GetSyncAutomatically(Account, String)

Check if the provider should be synced when a network tickle is received

GetType(Uri) GetType(Uri)

Return the MIME type of the given content URL.

Insert(Uri, ContentValues) Insert(Uri, ContentValues)

Inserts a row into a table at the given URL.

IsSyncActive(Account, String) IsSyncActive(Account, String)

Returns true if there is currently a sync operation for the given account or authority actively being processed.

IsSyncPending(Account, String) IsSyncPending(Account, String)

Return true if the pending status is true of any matching authorities.

JavaFinalize() JavaFinalize()

Invoked when the garbage collector has detected that this instance is no longer reachable.

(Inherited from Object)
Notify() Notify()

Causes a thread which is waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyAll() NotifyAll()

Causes all threads which are waiting on this object's monitor (by means of calling one of the wait() methods) to be woken up.

(Inherited from Object)
NotifyChange(Uri, ContentObserver) NotifyChange(Uri, ContentObserver)

Notify registered observers that a row was updated and attempt to sync changes to the network.

NotifyChange(Uri, ContentObserver, Boolean) NotifyChange(Uri, ContentObserver, Boolean)

Notify registered observers that a row was updated.

NotifyChange(Uri, ContentObserver, NotifyChangeFlags) NotifyChange(Uri, ContentObserver, NotifyChangeFlags)
OpenAssetFileDescriptor(Uri, String) OpenAssetFileDescriptor(Uri, String)

Open a raw file descriptor to access data under a URI.

OpenAssetFileDescriptor(Uri, String, CancellationSignal) OpenAssetFileDescriptor(Uri, String, CancellationSignal)

Open a raw file descriptor to access data under a URI.

OpenFileDescriptor(Uri, String) OpenFileDescriptor(Uri, String)

Open a raw file descriptor to access data under a URI.

OpenFileDescriptor(Uri, String, CancellationSignal) OpenFileDescriptor(Uri, String, CancellationSignal)

Open a raw file descriptor to access data under a URI.

OpenInputStream(Uri) OpenInputStream(Uri)

Open a stream on to the content associated with a content URI.

OpenOutputStream(Uri) OpenOutputStream(Uri)

Synonym for OpenOutputStream(Uri, String).

OpenOutputStream(Uri, String) OpenOutputStream(Uri, String)

Open a stream on to the content associated with a content URI.

OpenTypedAssetFileDescriptor(Uri, String, Bundle) OpenTypedAssetFileDescriptor(Uri, String, Bundle)

Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI.

OpenTypedAssetFileDescriptor(Uri, String, Bundle, CancellationSignal) OpenTypedAssetFileDescriptor(Uri, String, Bundle, CancellationSignal)

Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI.

Query(Uri, String[], Bundle, CancellationSignal) Query(Uri, String[], Bundle, CancellationSignal)
Query(Uri, String[], String, String[], String) Query(Uri, String[], String, String[], String)

Query the given URI, returning a ICursor over the result set.

Query(Uri, String[], String, String[], String, CancellationSignal) Query(Uri, String[], String, String[], String, CancellationSignal)

Query the given URI, returning a ICursor over the result set with optional support for cancellation.

Refresh(Uri, Bundle, CancellationSignal) Refresh(Uri, Bundle, CancellationSignal)
RegisterContentObserver(Uri, Boolean, ContentObserver) RegisterContentObserver(Uri, Boolean, ContentObserver)

Register an observer class that gets callbacks when data identified by a given content URI changes.

ReleasePersistableUriPermission(Uri, ActivityFlags) ReleasePersistableUriPermission(Uri, ActivityFlags)

Relinquish a persisted URI permission grant.

RemovePeriodicSync(Account, String, Bundle) RemovePeriodicSync(Account, String, Bundle)

Remove a periodic sync.

RemoveStatusChangeListener(Object) RemoveStatusChangeListener(Object)

Remove a previously registered status change listener.

RequestSync(Account, String, Bundle) RequestSync(Account, String, Bundle)

Start an asynchronous sync operation.

RequestSync(SyncRequest) RequestSync(SyncRequest)

Register a sync with the SyncManager.

SetHandle(IntPtr, JniHandleOwnership) SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetIsSyncable(Account, String, Int32) SetIsSyncable(Account, String, Int32)

Set whether this account/provider is syncable.

SetSyncAutomatically(Account, String, Boolean) SetSyncAutomatically(Account, String, Boolean)

Set whether or not the provider is synced when it receives a network tickle.

StartSync(Uri, Bundle) StartSync(Uri, Bundle)

Start an asynchronous sync operation.

TakePersistableUriPermission(Uri, ActivityFlags) TakePersistableUriPermission(Uri, ActivityFlags)

Take a persistable URI permission grant that has been offered.

ToArray<T>() ToArray<T>() Inherited from Object
ToString() ToString()

Returns a string containing a concise, human-readable description of this object.

(Inherited from Object)
Uncanonicalize(Uri) Uncanonicalize(Uri)

Given a canonical Uri previously generated by Canonicalize(Uri), convert it to its local non-canonical form.

UnregisterContentObserver(ContentObserver) UnregisterContentObserver(ContentObserver)

Unregisters a change observer.

UnregisterFromRuntime() UnregisterFromRuntime() Inherited from Object
Update(Uri, ContentValues, String, String[]) Update(Uri, ContentValues, String, String[])

Update row(s) in a content URI.

ValidateSyncExtrasBundle(Bundle) ValidateSyncExtrasBundle(Bundle)
Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

(Inherited from Object)
Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)
Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

(Inherited from Object)

Explicit Interface Implementations

IJavaObjectEx.ToLocalJniHandle() IJavaObjectEx.ToLocalJniHandle() Inherited from Object
IJavaPeerable.Disposed() IJavaPeerable.Disposed() Inherited from Object
IJavaPeerable.DisposeUnlessReferenced() IJavaPeerable.DisposeUnlessReferenced() Inherited from Object
IJavaPeerable.Finalized() IJavaPeerable.Finalized() Inherited from Object
IJavaPeerable.SetJniIdentityHashCode(Int32) IJavaPeerable.SetJniIdentityHashCode(Int32) Inherited from Object
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) Inherited from Object
IJavaPeerable.SetPeerReference(JniObjectReference) IJavaPeerable.SetPeerReference(JniObjectReference) Inherited from Object

Extension Methods

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject) JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable) GetJniTypeName(IJavaPeerable)

Applies to