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

# ResolveInfo

*** ** * ** ***


`
public


class
ResolveInfo
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

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


`

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

<br />

*** ** * ** ***

Information that is returned from resolving an intent
against an IntentFilter. This partially corresponds to
information collected from the AndroidManifest.xml's
\<intent\> tags.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/content/pm/ResolveInfo.DisplayNameComparator` |

### 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/ResolveInfo>` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#CREATOR` |
| ` public https://developer.android.com/reference/android/content/pm/ActivityInfo` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#activityInfo` The activity or broadcast receiver that corresponds to this resolution match, if this resolution is for an activity or broadcast receiver. |
| ` public https://developer.android.com/reference/android/content/IntentFilter` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#filter` The IntentFilter that was matched for this ResolveInfo. |
| ` public int` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#icon` A drawable resource identifier (in the package's resources) of this match's icon. |
| ` public boolean` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#isDefault` This filter has specified the Intent.CATEGORY_DEFAULT, meaning it would like to be considered a default action that the user can perform on this data. |
| ` public boolean` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#isInstantAppAvailable` Whether or not an instant app is available for the resolved intent. |
| ` public int` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#labelRes` A string resource identifier (in the package's resources) of this match's label. |
| ` public int` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#match` The system's evaluation of how well the activity matches the IntentFilter. |
| ` public https://developer.android.com/reference/java/lang/CharSequence` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#nonLocalizedLabel` The actual string retrieve from <var translate="no">labelRes</var> or null if none was provided. |
| ` public int` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#preferredOrder` Order of result according to the user's preference. |
| ` public int` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#priority` The declared priority of this match. |
| ` public https://developer.android.com/reference/android/content/pm/ProviderInfo` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#providerInfo` The provider that corresponds to this resolution match, if this resolution is for a provider. |
| ` public https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#resolvePackageName` Optional -- if non-null, the `https://developer.android.com/reference/android/content/pm/ResolveInfo#labelRes` and `https://developer.android.com/reference/android/content/pm/ResolveInfo#icon` resources will be loaded from this package, rather than the one containing the resolved component. |
| ` public https://developer.android.com/reference/android/content/pm/ServiceInfo` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#serviceInfo` The service that corresponds to this resolution match, if this resolution is for a service. |
| ` public int` | `https://developer.android.com/reference/android/content/pm/ResolveInfo#specificIndex` Only set when returned by `https://developer.android.com/reference/android/content/pm/PackageManager#queryIntentActivityOptions(android.content.ComponentName,%20android.content.Intent[],%20android.content.Intent,%20int)`, this tells you which of the given specific intents this result came from. |

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

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/content/pm/ResolveInfo#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` void` | ` https://developer.android.com/reference/android/content/pm/ResolveInfo#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) ` |
| ` final int` | ` https://developer.android.com/reference/android/content/pm/ResolveInfo#getIconResource()() ` Return the icon resource identifier to use for this match. |
| ` boolean` | ` https://developer.android.com/reference/android/content/pm/ResolveInfo#isCrossProfileIntentForwarderActivity()() ` Returns whether this resolution represents the intent forwarder activity. |
| ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/content/pm/ResolveInfo#loadIcon(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Retrieve the current graphical icon associated with this resolution. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/content/pm/ResolveInfo#loadLabel(android.content.pm.PackageManager)(https://developer.android.com/reference/android/content/pm/PackageManager pm) ` Retrieve the current textual label associated with this resolution. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/content/pm/ResolveInfo#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/content/pm/ResolveInfo#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int parcelableFlags) ` Flatten this object in to a Parcel. |

### Inherited methods

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.


## Fields

### CREATOR

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

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

<br />

<br />

### activityInfo

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

```
public ActivityInfo activityInfo
```

The activity or broadcast receiver that corresponds to this resolution
match, if this resolution is for an activity or broadcast receiver.
Exactly one of `https://developer.android.com/reference/android/content/pm/ResolveInfo#activityInfo`, `https://developer.android.com/reference/android/content/pm/ResolveInfo#serviceInfo`, or
`https://developer.android.com/reference/android/content/pm/ResolveInfo#providerInfo` will be non-null.

<br />

### filter

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

```
public IntentFilter filter
```

The IntentFilter that was matched for this ResolveInfo.

<br />

### icon

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

```
public int icon
```

A drawable resource identifier (in the package's resources) of this
match's icon. From the "icon" attribute or, if not set, 0. It is
set only if the icon can be obtained by resource id alone.

<br />

### isDefault

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

```
public boolean isDefault
```

This filter has specified the Intent.CATEGORY_DEFAULT, meaning it
would like to be considered a default action that the user can
perform on this data.

<br />

### isInstantAppAvailable

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

```
public boolean isInstantAppAvailable
```

Whether or not an instant app is available for the resolved intent.

<br />

### labelRes

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

```
public int labelRes
```

A string resource identifier (in the package's resources) of this
match's label. From the "label" attribute or, if not set, 0.

<br />

### match

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

```
public int match
```

The system's evaluation of how well the activity matches the
IntentFilter. This is a match constant, a combination of
`https://developer.android.com/reference/android/content/IntentFilter#MATCH_CATEGORY_MASK`
and `https://developer.android.com/reference/android/content/IntentFilter#MATCH_ADJUSTMENT_MASK`.

<br />

### nonLocalizedLabel

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

```
public CharSequence nonLocalizedLabel
```

The actual string retrieve from <var translate="no">labelRes</var> or null if none
was provided.

<br />

### preferredOrder

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

```
public int preferredOrder
```

Order of result according to the user's preference. If the user
has not set a preference for this result, the value is 0; higher
values are a higher priority.

<br />

### priority

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

```
public int priority
```

The declared priority of this match. Comes from the "priority"
attribute or, if not set, defaults to 0. Higher values are a higher
priority.

<br />

### providerInfo

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

```
public ProviderInfo providerInfo
```

The provider that corresponds to this resolution match, if this
resolution is for a provider. Exactly one of `https://developer.android.com/reference/android/content/pm/ResolveInfo#activityInfo`,
`https://developer.android.com/reference/android/content/pm/ResolveInfo#serviceInfo`, or `https://developer.android.com/reference/android/content/pm/ResolveInfo#providerInfo` will be non-null.

<br />

### resolvePackageName

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

```
public String resolvePackageName
```

Optional -- if non-null, the `https://developer.android.com/reference/android/content/pm/ResolveInfo#labelRes` and `https://developer.android.com/reference/android/content/pm/ResolveInfo#icon`
resources will be loaded from this package, rather than the one
containing the resolved component.

<br />

### serviceInfo

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

```
public ServiceInfo serviceInfo
```

The service that corresponds to this resolution match, if this resolution
is for a service. Exactly one of `https://developer.android.com/reference/android/content/pm/ResolveInfo#activityInfo`,
`https://developer.android.com/reference/android/content/pm/ResolveInfo#serviceInfo`, or `https://developer.android.com/reference/android/content/pm/ResolveInfo#providerInfo` will be non-null.

<br />

### specificIndex

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

```
public int specificIndex
```

Only set when returned by
`https://developer.android.com/reference/android/content/pm/PackageManager#queryIntentActivityOptions(android.content.ComponentName,%20android.content.Intent[],%20android.content.Intent,%20int)`, this tells you
which of the given specific intents this result came from. 0 is the
first in the list, \< 0 means it came from the generic Intent query.

<br />

## Public constructors

### ResolveInfo

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

```
public ResolveInfo ()
```

<br />

<br />

### ResolveInfo

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

```
public ResolveInfo (ResolveInfo orig)
```

<br />

<br />

| Parameters ||
|---|---|
| `orig` | `ResolveInfo` <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 1](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 /> |

### getIconResource

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

```
public final int getIconResource ()
```

Return the icon resource identifier to use for this match. If the
match defines an icon, that is used; else if the activity defines
an icon, that is used; else, the application icon is used.

<br />

| Returns ||
|---|---|
| `int` | The icon associated with this match. <br /> |

### isCrossProfileIntentForwarderActivity

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

```
public boolean isCrossProfileIntentForwarderActivity ()
```

Returns whether this resolution represents the intent forwarder activity.

<br />

| Returns ||
|---|---|
| `boolean` | whether this resolution represents the intent forwarder activity <br /> |

### loadIcon

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

```
public Drawable loadIcon (PackageManager pm)
```

Retrieve the current graphical icon associated with this resolution. This
will call back on the given PackageManager to load the icon from
the application.

The returned drawable is subject to the same size capping limits as described
in `https://developer.android.com/reference/android/content/pm/PackageManager#getApplicationIcon(android.content.pm.ApplicationInfo)`.

<br />

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: A PackageManager from which the icon can be loaded; usually the PackageManager from which you originally retrieved this item. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | Returns a Drawable containing the resolution's icon. If the item does not have an icon, the default activity icon is returned. <br /> |

### loadLabel

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

```
public CharSequence loadLabel (PackageManager pm)
```

Retrieve the current textual label associated with this resolution. This
will call back on the given PackageManager to load the label from
the application.

<br />

| Parameters ||
|---|---|
| `pm` | `PackageManager`: A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | Returns a CharSequence containing the resolutions's label. If the item does not have a label, its name is returned. This value cannot be `null`. <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 dest, 
                int parcelableFlags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `parcelableFlags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |