Language

PackageManager.QueryContentProviders Method

Definition

Overloads

Name Description
QueryContentProviders(String, Int32, PackageInfoFlags)

Retrieve content provider information.

QueryContentProviders(String, Int32, PackageManager+ComponentInfoFlags)

See queryContentProviders(String,int,int).

QueryContentProviders(String, Int32, PackageInfoFlags)

Retrieve content provider information.

[Android.Runtime.Register("queryContentProviders", "(Ljava/lang/String;II)Ljava/util/List;", "GetQueryContentProviders_Ljava_lang_String_IIHandler")]
public abstract System.Collections.Generic.IList<Android.Content.PM.ProviderInfo> QueryContentProviders(string? processName, int uid, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("queryContentProviders", "(Ljava/lang/String;II)Ljava/util/List;", "GetQueryContentProviders_Ljava_lang_String_IIHandler")>]
abstract member QueryContentProviders : string * int * Android.Content.PM.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.ProviderInfo>

Parameters

processName
String

If non-null, limits the returned providers to only those that are hosted by the given process. If null, all content providers are returned.

uid
Int32

If <var>processName</var> is non-null, this is the required uid owning the requested content providers.

flags
PackageInfoFlags

Additional option flags to modify the data returned.

Returns

A list of ProviderInfo objects containing one entry for each provider either matching <var>processName</var> or, if <var>processName</var> is null, all known content providers. <em>If there are no matching providers, null is returned.</em>

Attributes

Remarks

Retrieve content provider information.

<em>Note: unlike most other methods, an empty result set is indicated by a null return instead of an empty list.</em>

Use #queryContentProviders(String, int, ComponentInfoFlags) when long flags are needed.

Java documentation for android.content.pm.PackageManager.queryContentProviders(java.lang.String, int, int).

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.

Applies to

QueryContentProviders(String, Int32, PackageManager+ComponentInfoFlags)

See queryContentProviders(String,int,int).

[Android.Runtime.Register("queryContentProviders", "(Ljava/lang/String;ILandroid/content/pm/PackageManager$ComponentInfoFlags;)Ljava/util/List;", "GetQueryContentProviders_Ljava_lang_String_ILandroid_content_pm_PackageManager_ComponentInfoFlags_Handler", ApiSince=33)]
public virtual System.Collections.Generic.IList<Android.Content.PM.ProviderInfo> QueryContentProviders(string? processName, int uid, Android.Content.PM.PackageManager.ComponentInfoFlags flags);
[<Android.Runtime.Register("queryContentProviders", "(Ljava/lang/String;ILandroid/content/pm/PackageManager$ComponentInfoFlags;)Ljava/util/List;", "GetQueryContentProviders_Ljava_lang_String_ILandroid_content_pm_PackageManager_ComponentInfoFlags_Handler", ApiSince=33)>]
abstract member QueryContentProviders : string * int * Android.Content.PM.PackageManager.ComponentInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.ProviderInfo>
override this.QueryContentProviders : string * int * Android.Content.PM.PackageManager.ComponentInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.ProviderInfo>

Parameters

processName
String

The provider-hosting process to restrict the query to, or null to omit this process filter.

uid
Int32

The UID used for process matching and for resolving user-specific query flags.

flags
PackageManager.ComponentInfoFlags

The component-query flag wrapper controlling matching and returned details.

Returns

The provider records returned by the query. The framework client substitutes an empty list for a missing service result.

Attributes

Remarks

See queryContentProviders(String,int,int).

Android reference for android.content.pm.PackageManager.queryContentProviders.

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.

Applies to