Udostępnij za pośrednictwem


PackageManager.QueryContentProviders Method

Definition

Overloads

QueryContentProviders(String, Int32, PackageInfoFlags)

Retrieve content provider information.

QueryContentProviders(String, Int32, PackageManager+ComponentInfoFlags)

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)

[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
uid
Int32

Returns

Attributes

Applies to