Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/content/pm/ProviderInfo#constants) \| [Inherited Constants](https://developer.android.com/reference/android/content/pm/ProviderInfo#inhconstants) \| [Fields](https://developer.android.com/reference/android/content/pm/ProviderInfo#lfields) \| [Inherited Fields](https://developer.android.com/reference/android/content/pm/ProviderInfo#inhfields) \| [Ctors](https://developer.android.com/reference/android/content/pm/ProviderInfo#pubctors) \| [Methods](https://developer.android.com/reference/android/content/pm/ProviderInfo#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/content/pm/ProviderInfo#inhmethods)

# ProviderInfo

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/content/pm/ProviderInfo "View this page in Kotlin") \|Java


`
public

final

class
ProviderInfo
`


`


`

`


`

`

extends https://developer.android.com/reference/android/content/pm/ComponentInfo


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||||
| ↳ | [android.content.pm.PackageItemInfo](https://developer.android.com/reference/android/content/pm/PackageItemInfo) |||
|   | ↳ | [android.content.pm.ComponentInfo](https://developer.android.com/reference/android/content/pm/ComponentInfo) ||
|   |   | ↳ | android.content.pm.ProviderInfo |

<br />

*** ** * ** ***

Holds information about a specific
`https://developer.android.com/reference/android/content/ContentProvider`. This is returned by
`https://developer.android.com/reference/android/content/pm/PackageManager#resolveContentProvider(java.lang.String,%20int)`.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#FLAG_SINGLE_USER` Bit in `https://developer.android.com/reference/android/content/pm/ProviderInfo#flags`: If set, a single instance of the provider will run for all users on the device. |

| ### Inherited constants |
|---|
| From interface `https://developer.android.com/reference/android/os/Parcelable` |---|---| | `int` | `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor. | | `int` | `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". | |

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/content/pm/ProviderInfo>` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#CREATOR` |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#authority` The name provider is published under content:// |
| ` public int` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#flags` Options that have been set in the provider declaration in the manifest. |
| ` public boolean` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#forceUriPermissions` If true, always apply URI permission grants, as per the `https://developer.android.com/reference/android/R.styleable#AndroidManifestProvider_forceUriPermissions` attribute. |
| ` public boolean` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#grantUriPermissions` If true, additional permissions to specific Uris in this content provider can be granted, as per the `https://developer.android.com/reference/android/R.styleable#AndroidManifestProvider_grantUriPermissions` attribute. |
| ` public int` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#initOrder` Used to control initialization order of single-process providers running in the same process. |
| ` public boolean` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#isSyncable` *This field was deprecated in API level 15. This flag is now being ignored. The current way to make a provider syncable is to provide a SyncAdapter service for a given provider/account type.* |
| ` public boolean` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#multiprocess` If true, this content provider allows multiple instances of itself to run in different process. |
| ` public https://developer.android.com/reference/android/content/pm/PathPermission` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#pathPermissions` If non-null, these are path-specific permissions that are allowed for accessing the provider. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#readPermission` Optional permission required for read-only access this content provider. |
| ` public https://developer.android.com/reference/android/os/PatternMatcher` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#uriPermissionPatterns` If non-null, these are the patterns that are allowed for granting URI permissions. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/ProviderInfo#writePermission` Optional permission required for read/write access this content provider. |

| ### Inherited fields |
|---|
| From class `https://developer.android.com/reference/android/content/pm/ComponentInfo` |---|---| | ` public https://developer.android.com/reference/android/content/pm/ApplicationInfo` | `https://developer.android.com/reference/android/content/pm/ComponentInfo#applicationInfo` Global information about the application/package this component is a part of. | | ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/ComponentInfo#attributionTags` Set of attribution tags that should be automatically applied to this component. | | ` public int` | `https://developer.android.com/reference/android/content/pm/ComponentInfo#descriptionRes` A string resource identifier (in the package's resources) containing a user-readable description of the component. | | ` public boolean` | `https://developer.android.com/reference/android/content/pm/ComponentInfo#directBootAware` Indicates if this component is aware of direct boot lifecycle, and can be safely run before the user has entered their credentials (such as a lock pattern or PIN). | | ` public boolean` | `https://developer.android.com/reference/android/content/pm/ComponentInfo#enabled` Indicates whether or not this component may be instantiated. | | ` public boolean` | `https://developer.android.com/reference/android/content/pm/ComponentInfo#exported` Set to true if this component is available for use by other applications. | | ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/ComponentInfo#processName` The name of the process this component should run in. | | ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/ComponentInfo#splitName` The name of the split in which this component is declared. | |
| From class `https://developer.android.com/reference/android/content/pm/PackageItemInfo` |---|---| | ` public int` | `https://developer.android.com/reference/android/content/pm/PackageItemInfo#banner` A drawable resource identifier (in the package's resources) of this component's banner. | | ` public int` | `https://developer.android.com/reference/android/content/pm/PackageItemInfo#icon` A drawable resource identifier (in the package's resources) of this component's icon. | | ` public boolean` | `https://developer.android.com/reference/android/content/pm/PackageItemInfo#isArchived` Whether the package is currently in an archived state. | | ` public int` | `https://developer.android.com/reference/android/content/pm/PackageItemInfo#labelRes` A string resource identifier (in the package's resources) of this component's label. | | ` public int` | `https://developer.android.com/reference/android/content/pm/PackageItemInfo#logo` A drawable resource identifier (in the package's resources) of this component's logo. | | ` public https://developer.android.com/reference/android/os/Bundle` | `https://developer.android.com/reference/android/content/pm/PackageItemInfo#metaData` Additional meta-data associated with this component. | | ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/PackageItemInfo#name` Public name of this item. | | ` public https://developer.android.com/reference/java/lang/CharSequence` | `https://developer.android.com/reference/android/content/pm/PackageItemInfo#nonLocalizedLabel` The string provided in the AndroidManifest file, if any. | | ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/PackageItemInfo#packageName` Name of the package that this item is in. | |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/content/pm/ProviderInfo#ProviderInfo()() ` |
| ` https://developer.android.com/reference/android/content/pm/ProviderInfo#ProviderInfo(android.content.pm.ProviderInfo)(https://developer.android.com/reference/android/content/pm/ProviderInfo orig) ` |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/content/pm/ProviderInfo#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` void` | ` https://developer.android.com/reference/android/content/pm/ProviderInfo#dump(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/content/pm/ProviderInfo#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/content/pm/ProviderInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel out, int parcelableFlags) ` |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/android/content/pm/ComponentInfo ` |---|---| | ` void` | ` https://developer.android.com/reference/android/content/pm/ComponentInfo#dumpBack(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` | | ` void` | ` https://developer.android.com/reference/android/content/pm/ComponentInfo#dumpFront(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` | | ` final int` | ` https://developer.android.com/reference/android/content/pm/ComponentInfo#getBannerResource()() ` Return the banner resource identifier to use for this component. | | ` final int` | ` https://developer.android.com/reference/android/content/pm/ComponentInfo#getIconResource()() ` Return the icon resource identifier to use for this component. | | ` final int` | ` https://developer.android.com/reference/android/content/pm/ComponentInfo#getLogoResource()() ` Return the logo resource identifier to use for this component. | | ` boolean` | ` https://developer.android.com/reference/android/content/pm/ComponentInfo#isEnabled()() ` Return whether this component and its enclosing application are enabled. | | ` void` | ` https://developer.android.com/reference/android/content/pm/ComponentInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int parcelableFlags) ` | ||
| From class ` https://developer.android.com/reference/android/content/pm/PackageItemInfo ` |---|---| | ` void` | ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#dumpBack(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` | | ` void` | ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#dumpFront(android.util.Printer,%20java.lang.String)(https://developer.android.com/reference/android/util/Printer pw, https://developer.android.com/reference/java/lang/String prefix) ` | | ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadBanner(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Retrieve the current graphical banner associated with this item. | | ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadIcon(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Retrieve the current graphical icon associated with this item. | | ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadLabel(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Retrieve the current textual label associated with this item. | | ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadLogo(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Retrieve the current graphical logo associated with this item. | | ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadUnbadgedIcon(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Retrieve the current graphical icon associated with this item without the addition of a work badge if applicable. | | ` https://developer.android.com/reference/android/content/res/XmlResourceParser` | ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#loadXmlMetaData(android.content.pm.PackageManager,%20java.lang.String)(https://developer.android.com/reference/android/content/pm/PackageManager pm, https://developer.android.com/reference/java/lang/String name) ` Load an XML resource attached to the meta-data of this item. | | ` void` | ` https://developer.android.com/reference/android/content/pm/PackageItemInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int parcelableFlags) ` | ||
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||
| From interface ` https://developer.android.com/reference/android/os/Parcelable ` |---|---| | ` abstract int` | ` https://developer.android.com/reference/android/os/Parcelable#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. | | ` abstract void` | ` https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. | ||

## Constants

### FLAG_SINGLE_USER

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FLAG_SINGLE_USER
```

Bit in `https://developer.android.com/reference/android/content/pm/ProviderInfo#flags`: If set, a single instance of the provider will
run for all users on the device. Set from the
`https://developer.android.com/reference/android/R.attr#singleUser` attribute.

<br />

Constant Value:

1073741824
(0x40000000)


## Fields

### CREATOR

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<ProviderInfo> CREATOR
```

<br />

<br />

### authority

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String authority
```

The name provider is published under content://

<br />

### flags

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int flags
```

Options that have been set in the provider declaration in the
manifest.
These include: `https://developer.android.com/reference/android/content/pm/ProviderInfo#FLAG_SINGLE_USER`.

<br />

### forceUriPermissions

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean forceUriPermissions
```

If true, always apply URI permission grants, as per the
`https://developer.android.com/reference/android/R.styleable#AndroidManifestProvider_forceUriPermissions` attribute.

<br />

### grantUriPermissions

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean grantUriPermissions
```

If true, additional permissions to specific Uris in this content
provider can be granted, as per the
`https://developer.android.com/reference/android/R.styleable#AndroidManifestProvider_grantUriPermissions` attribute.

<br />

### initOrder

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int initOrder
```

Used to control initialization order of single-process providers
running in the same process. Higher goes first.

<br />

### isSyncable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isSyncable
```


**This field was deprecated
in API level 15.**   

This flag is now being ignored. The current way to make a provider
syncable is to provide a SyncAdapter service for a given provider/account type.

Whether or not this provider is syncable.

<br />

### multiprocess

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean multiprocess
```

If true, this content provider allows multiple instances of itself
to run in different process. If false, a single instances is always
run in `https://developer.android.com/reference/android/content/pm/ComponentInfo#processName`.

<br />

### pathPermissions

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PathPermission[] pathPermissions
```

If non-null, these are path-specific permissions that are allowed for
accessing the provider. Any permissions listed here will allow a
holding client to access the provider, and the provider will check
the URI it provides when making calls against the patterns here.

<br />

### readPermission

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String readPermission
```

Optional permission required for read-only access this content
provider.

<br />

### uriPermissionPatterns

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PatternMatcher[] uriPermissionPatterns
```

If non-null, these are the patterns that are allowed for granting URI
permissions. Any URI that does not match one of these patterns will not
allowed to be granted. If null, all URIs are allowed. The
`https://developer.android.com/reference/android/content/pm/PackageManager#GET_URI_PERMISSION_PATTERNS` flag must be specified for
this field to be filled in.

<br />

### writePermission

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String writePermission
```

Optional permission required for read/write access this content
provider.

<br />

## Public constructors

### ProviderInfo

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ProviderInfo ()
```

<br />

<br />

### ProviderInfo

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ProviderInfo (ProviderInfo orig)
```

<br />

<br />

| Parameters ||
|---|---|
| `orig` | `ProviderInfo` <br /> |

## Public methods

### describeContents

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### dump

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dump (Printer pw, 
                String prefix)
```

<br />

<br />

| Parameters ||
|---|---|
| `pw` | `Printer` <br /> |
| `prefix` | `String` <br /> |

### toString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel out, 
                int parcelableFlags)
```

<br />

<br />

| Parameters ||
|---|---|
| `out` | `Parcel` <br /> |
| `parcelableFlags` | `int` <br /> |