Added in API level 1

ResolveInfo


open class ResolveInfo : Parcelable
kotlin.Any
   ↳ android.content.pm.ResolveInfo

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
open

Inherited constants
Public constructors

Public methods
open Int

open Unit
dump(pw: Printer!, prefix: String!)

Int

Return the icon resource identifier to use for this match.

open Boolean

Returns whether this resolution represents the intent forwarder activity.

open Drawable!

Retrieve the current graphical icon associated with this resolution.

open CharSequence

Retrieve the current textual label associated with this resolution.

open String

open Unit
writeToParcel(dest: Parcel, parcelableFlags: Int)

Properties
static Parcelable.Creator<ResolveInfo!>

ActivityInfo!

The activity or broadcast receiver that corresponds to this resolution match, if this resolution is for an activity or broadcast receiver.

IntentFilter!

The IntentFilter that was matched for this ResolveInfo.

Int

A drawable resource identifier (in the package's resources) of this match's icon.

Boolean

This filter has specified the Intent.

Boolean

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

Int

A string resource identifier (in the package's resources) of this match's label.

Int

The system's evaluation of how well the activity matches the IntentFilter.

CharSequence!

The actual string retrieve from labelRes or null if none was provided.

Int

Order of result according to the user's preference.

Int

The declared priority of this match.

ProviderInfo!

The provider that corresponds to this resolution match, if this resolution is for a provider.

String!

Optional -- if non-null, the labelRes and icon resources will be loaded from this package, rather than the one containing the resolved component.

ServiceInfo!

The service that corresponds to this resolution match, if this resolution is for a service.

Int

Only set when returned by android.

Public constructors

ResolveInfo

Added in API level 1
ResolveInfo()

ResolveInfo

Added in API level 17
ResolveInfo(orig: ResolveInfo!)

Public methods

describeContents

Added in API level 1
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

dump

Added in API level 1
open fun dump(
    pw: Printer!,
    prefix: String!
): Unit

getIconResource

Added in API level 1
fun getIconResource(): Int

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.

Return
Int The icon associated with this match.

isCrossProfileIntentForwarderActivity

Added in API level 30
open fun isCrossProfileIntentForwarderActivity(): Boolean

Returns whether this resolution represents the intent forwarder activity.

Return
Boolean whether this resolution represents the intent forwarder activity

loadIcon

Added in API level 1
open fun loadIcon(pm: PackageManager!): Drawable!

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

Parameters
pm PackageManager!: A PackageManager from which the icon can be loaded; usually the PackageManager from which you originally retrieved this item.
Return
Drawable! Returns a Drawable containing the resolution's icon. If the item does not have an icon, the default activity icon is returned.

loadLabel

Added in API level 1
open fun loadLabel(pm: PackageManager): CharSequence

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

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.
Return
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.

toString

Added in API level 1
open fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 1
open fun writeToParcel(
    dest: Parcel,
    parcelableFlags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 1
static val CREATOR: Parcelable.Creator<ResolveInfo!>

activityInfo

Added in API level 1
var 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 activityInfo, serviceInfo, or providerInfo will be non-null.

filter

Added in API level 1
var filter: IntentFilter!

The IntentFilter that was matched for this ResolveInfo.

icon

Added in API level 1
var icon: Int

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.

isDefault

Added in API level 1
var isDefault: Boolean

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.

isInstantAppAvailable

Added in API level 26
var isInstantAppAvailable: Boolean

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

labelRes

Added in API level 1
var labelRes: Int

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

match

Added in API level 1
var match: Int

The system's evaluation of how well the activity matches the IntentFilter. This is a match constant, a combination of IntentFilter.MATCH_CATEGORY_MASK and IntentFiler.MATCH_ADJUSTMENT_MASK.

nonLocalizedLabel

Added in API level 1
var nonLocalizedLabel: CharSequence!

The actual string retrieve from labelRes or null if none was provided.

preferredOrder

Added in API level 1
var preferredOrder: Int

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.

priority

Added in API level 1
var priority: Int

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

providerInfo

Added in API level 19
var providerInfo: ProviderInfo!

The provider that corresponds to this resolution match, if this resolution is for a provider. Exactly one of activityInfo, serviceInfo, or providerInfo will be non-null.

resolvePackageName

Added in API level 5
var resolvePackageName: String!

Optional -- if non-null, the labelRes and icon resources will be loaded from this package, rather than the one containing the resolved component.

serviceInfo

Added in API level 1
var serviceInfo: ServiceInfo!

The service that corresponds to this resolution match, if this resolution is for a service. Exactly one of activityInfo, serviceInfo, or providerInfo will be non-null.

specificIndex

Added in API level 1
var specificIndex: Int

Only set when returned by android.content.pm.PackageManager#queryIntentActivityOptions, 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.