Android Guides | Samples

Android.Content.ContentProviderClient Class

The public interface object used to interact with a ContentProvider.

See Also: ContentProviderClient

Syntax

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

Remarks

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]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
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

[read-only]
LocalContentProviderContentProvider. Get a reference to the ContentProvider that is associated with this client.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
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)