Share via


PackageManager.ResolveContentProvider Method

Definition

Overloads

ResolveContentProvider(String, PackageManager+ComponentInfoFlags)
ResolveContentProvider(String, PackageInfoFlags)

Find a single content provider by its authority.

ResolveContentProvider(String, PackageManager+ComponentInfoFlags)

[Android.Runtime.Register("resolveContentProvider", "(Ljava/lang/String;Landroid/content/pm/PackageManager$ComponentInfoFlags;)Landroid/content/pm/ProviderInfo;", "GetResolveContentProvider_Ljava_lang_String_Landroid_content_pm_PackageManager_ComponentInfoFlags_Handler", ApiSince=33)]
public virtual Android.Content.PM.ProviderInfo? ResolveContentProvider (string authority, Android.Content.PM.PackageManager.ComponentInfoFlags flags);
[<Android.Runtime.Register("resolveContentProvider", "(Ljava/lang/String;Landroid/content/pm/PackageManager$ComponentInfoFlags;)Landroid/content/pm/ProviderInfo;", "GetResolveContentProvider_Ljava_lang_String_Landroid_content_pm_PackageManager_ComponentInfoFlags_Handler", ApiSince=33)>]
abstract member ResolveContentProvider : string * Android.Content.PM.PackageManager.ComponentInfoFlags -> Android.Content.PM.ProviderInfo
override this.ResolveContentProvider : string * Android.Content.PM.PackageManager.ComponentInfoFlags -> Android.Content.PM.ProviderInfo

Parameters

authority
String

Returns

Attributes

Applies to

ResolveContentProvider(String, PackageInfoFlags)

Find a single content provider by its authority.

[Android.Runtime.Register("resolveContentProvider", "(Ljava/lang/String;I)Landroid/content/pm/ProviderInfo;", "GetResolveContentProvider_Ljava_lang_String_IHandler")]
public abstract Android.Content.PM.ProviderInfo? ResolveContentProvider (string authority, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("resolveContentProvider", "(Ljava/lang/String;I)Landroid/content/pm/ProviderInfo;", "GetResolveContentProvider_Ljava_lang_String_IHandler")>]
abstract member ResolveContentProvider : string * Android.Content.PM.PackageInfoFlags -> Android.Content.PM.ProviderInfo

Parameters

authority
String

The authority of the provider to find.

flags
PackageInfoFlags

Additional option flags to modify the data returned.

Returns

A ProviderInfo object containing information about the provider. If a provider was not found, returns null.

Attributes

Remarks

Find a single content provider by its authority.

Example:

Uri uri = Uri.parse("content://com.example.app.provider/table1");
            ProviderInfo info = packageManager.resolveContentProvider(uri.getAuthority(), flags);

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

Java documentation for android.content.pm.PackageManager.resolveContentProvider(java.lang.String, 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