Dela via


ContentProviderClient Class

Definition

The public interface object used to interact with a specific ContentProvider.

[Android.Runtime.Register("android/content/ContentProviderClient", DoNotGenerateAcw=true)]
public class ContentProviderClient : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.IAutoCloseable
[<Android.Runtime.Register("android/content/ContentProviderClient", DoNotGenerateAcw=true)>]
type ContentProviderClient = class
    inherit Object
    interface IAutoCloseable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
ContentProviderClient
Attributes
Implements

Remarks

The public interface object used to interact with a specific ContentProvider.

Instances can be obtained by calling ContentResolver#acquireContentProviderClient or ContentResolver#acquireUnstableContentProviderClient. Instances must be released using #close() in order to indicate to the system that the underlying ContentProvider is no longer needed and can be killed to free up resources.

Note that you should generally create a new ContentProviderClient instance for each thread that will be performing operations. Unlike ContentResolver, the methods here such as #query and #openFile are not thread safe -- you must not call #close() on the ContentProviderClient those calls are made from until you are finished with the data they have returned.

Java documentation for android.content.ContentProviderClient.

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

ContentProviderClient(IntPtr, JniHandleOwnership)

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

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
LocalContentProvider

Get a reference to the ContentProvider that is associated with this client.

PeerReference (Inherited from Object)
ThresholdClass

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

ThresholdType

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

Methods

ApplyBatch(IList<ContentProviderOperation>)

See ContentProvider#applyBatch ContentProvider.applyBatch

ApplyBatch(String, IList<ContentProviderOperation>)

See ContentProvider#applyBatch ContentProvider.applyBatch

BulkInsert(Uri, ContentValues[])

See ContentProvider#bulkInsert ContentProvider.bulkInsert

Call(String, String, Bundle)

See ContentProvider#call(String, String, Bundle)

Call(String, String, String, Bundle)

See ContentProvider#call(String, String, Bundle)

Canonicalize(Uri)

See ContentProvider#canonicalize

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Close()

Closes this client connection, indicating to the system that the underlying ContentProvider is no longer needed.

Delete(Uri, Bundle)

See ContentProvider#delete ContentProvider.delete

Delete(Uri, String, String[])

See ContentProvider#delete ContentProvider.delete

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

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetStreamTypes(Uri, String)

See ContentProvider#getStreamTypes ContentProvider.getStreamTypes

GetType(Uri)

See ContentProvider#getType ContentProvider.getType

Insert(Uri, ContentValues, Bundle)

See ContentProvider#insert ContentProvider.insert

Insert(Uri, ContentValues)

See ContentProvider#insert ContentProvider.insert

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
OpenAssetFile(Uri, String, CancellationSignal)

See ContentProvider#openAssetFile ContentProvider.openAssetFile.

OpenAssetFile(Uri, String)

See ContentProvider#openAssetFile ContentProvider.openAssetFile.

OpenFile(Uri, String, CancellationSignal)

See ContentProvider#openFile ContentProvider.openFile.

OpenFile(Uri, String)

See ContentProvider#openFile ContentProvider.openFile.

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

See ContentProvider#openTypedAssetFile ContentProvider.openTypedAssetFile

OpenTypedAssetFileDescriptor(Uri, String, Bundle)

See ContentProvider#openTypedAssetFile ContentProvider.openTypedAssetFile

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

See ContentProvider#query ContentProvider.query

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

See ContentProvider#query ContentProvider.query

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

See ContentProvider#query ContentProvider.query

Refresh(Uri, Bundle, CancellationSignal)

See ContentProvider#refresh

Release()

This member is deprecated.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

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

Returns a string representation of the object.

(Inherited from Object)
Uncanonicalize(Uri)

See ContentProvider#uncanonicalize

UnregisterFromRuntime() (Inherited from Object)
Update(Uri, ContentValues, Bundle)

See ContentProvider#update ContentProvider.update

Update(Uri, ContentValues, String, String[])

See ContentProvider#update ContentProvider.update

Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

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

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to