Android Guides | Samples

Android.Content.ContentProviderClient Class

The public interface object used to interact with a ContentProvider.

See Also: ContentProviderClient


[Android.Runtime.Register("android/content/ContentProviderClient", DoNotGenerateAcw=true)]
public class ContentProviderClient : Object


The public interface object used to interact with a ContentProvider. This is obtained by calling ContentResolver.AcquireContentProviderClient(Uri). This object must be released using ContentProviderClient.Release in order to indicate to the system that the 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 ContentProviderClient.Query(Uri,String[],String[],String[],String[]) and ContentProviderClient.OpenFile(Uri,String) are not thread safe -- you must not call ContentProviderClient.Release on the ContentProviderClient those calls are made from until you are finished with the data they have returned.

[Android Documentation]


Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions:
Since: Added in API level 5

The members of Android.Content.ContentProviderClient are listed below.

See Also: Object

Protected Constructors

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

Public Properties

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

Protected Properties

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

Public Methods

ApplyBatch(IList<ContentProviderOperation>) : ContentProviderResult[]
BulkInsert(Uri, ContentValues[]) : Int32
See ContentProvider.BulkInsert(Uri,ContentValues[])
Call(String, String, Bundle) : Bundle
See ContentProvider.Call(String,String,String)
Canonicalize(Uri) : Uri
See ContentProvider.Canonicalize(Uri)
Delete(Uri, String, String[]) : Int32
See ContentProvider.Delete(Uri,String,String)
GetStreamTypes(Uri, String) : String[]
See ContentProvider.GetStreamTypes(Uri,String)
GetType(Uri) : String
See ContentProvider.GetType(Uri)
Insert(Uri, ContentValues) : Uri
See ContentProvider.Insert(Uri,ContentValues)
OpenAssetFile(Uri, String) : AssetFileDescriptor
See ContentProvider.OpenAssetFile(Uri,String).
OpenAssetFile(Uri, String, CancellationSignal) : AssetFileDescriptor
See ContentProvider.OpenAssetFile(Uri,String).
OpenFile(Uri, String) : ParcelFileDescriptor
See ContentProvider.OpenFile(Uri,String).
OpenFile(Uri, String, CancellationSignal) : ParcelFileDescriptor
See ContentProvider.OpenFile(Uri,String).
OpenTypedAssetFileDescriptor(Uri, String, Bundle) : AssetFileDescriptor
See ContentProvider.OpenTypedAssetFile(Uri,String,String)
OpenTypedAssetFileDescriptor(Uri, String, Bundle, CancellationSignal) : AssetFileDescriptor
See ContentProvider.OpenTypedAssetFile(Uri,String,String)
Query(Uri, String[], String, String[], String) : ICursor
See ContentProvider.Query(Uri,String[],String[],String[],String[])
Query(Uri, String[], String, String[], String, CancellationSignal) : ICursor
See ContentProvider.Query(Uri,String[],String[],String[],String[])
Release() : Boolean
Call this to indicate to the system that the associated ContentProvider is no longer needed by this ContentProviderClient.
Uncanonicalize(Uri) : Uri
See ContentProvider.Uncanonicalize(Uri)
Update(Uri, ContentValues, String, String[]) : Int32
See ContentProvider.Update(Uri,ContentValues,ContentValues,ContentValues)