Reference:Android.content.pm.ResolveInfo

From Triled Wiki

Jump to: navigation, search


android.content.pm
public class android.content.pm.ResolveInfo

java.lang.Object
android.content.pm.ResolveInfo Parcelable
Information that is returned from resolving an intent against an IntentFilter. This partially corresponds to information collected from the AndroidManifest.xml's <intent> tags.

Contents

[edit] Nested Classes
ResolveInfo.DisplayNameComparator  

[edit] Summary

[edit] Constants

      Value  
Creator   CREATOR        

[edit] Fields

public      ActivityInfo   activityInfo   The activity that corresponds to this resolution match, if this resolution is for an activity.  
public      IntentFilter   filter   The IntentFilter that was matched for this ResolveInfo.  
public      int  icon   A drawable resource identifier (in the package's resources) of this match's icon.  
public      boolean  isDefault   This filter has specified the Intent.DEFAULT_CATEGORY, meaning it would like to be considered a default action that the user can perform on this data.  
public      int  labelRes   A string resource identifier (in the package's resources) of this match's label.  
public      int  match   The system's evaluation of how well the activity matches the IntentFilter.  
public      CharSequence   nonLocalizedLabel   The actual string retrieve from labelRes or null if none was provided.  
public      int  preferredOrder   Order of result according to the user's preference.  
public      int  priority   The declared priority of this match.  
public      ServiceInfo   serviceInfo   The service that corresponds to this resolution match, if this resolution is for a service.  
public      int  specificIndex   Only set when returned by queryIntentActivityOptions(ComponentName, Intent[], Intent, int), this tells you which of the given specific intents this result came from.  

[edit] Public Constructors

          ResolveInfo ()

[edit] Public Methods

        void  dump (Printer pw, String prefix)
    final    int  getIconResource ()
Return the icon resource identifier to use for this match.
        Drawable   loadIcon (PackageManager pm)
Retrieve the current graphical icon associated with this resolution.
        CharSequence   loadLabel (PackageManager pm)
Retrieve the current textual label associated with this resolution.
        String   toString ()
Answers a string containing a concise, human-readable description of the receiver.
        void  writeToParcel (Parcel dest)

[edit] Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
[edit] Methods inherited from interface android.os.Parcelable

writeToParcel

[edit] Details

[edit] Constants

[edit] public static final Creator CREATOR

[edit] Fields

[edit] public ActivityInfo activityInfo

The activity that corresponds to this resolution match, if this resolution is for an activity. One and only one of this and serviceInfo must be non-null.

[edit] public IntentFilter filter

The IntentFilter that was matched for this ResolveInfo.

[edit] 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.

[edit] public boolean isDefault

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

[edit] 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.

[edit] public int match

The system's evaluation of how well the activity matches the IntentFilter. At this point the match value is opaque, simply telling you that higher values are considered better than lower ones.

[edit] public CharSequence nonLocalizedLabel

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

[edit] 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.

[edit] 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.

[edit] public ServiceInfo serviceInfo

The service that corresponds to this resolution match, if this resolution is for a service. One and only one of this and serviceInfo must be non-null.

[edit] public int specificIndex

Only set when returned by queryIntentActivityOptions(ComponentName, Intent[], Intent, int), 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.

[edit] Public Constructors

[edit] public ResolveInfo()

[edit] Public Methods

[edit] public void dump(Printer pw, String prefix)

[edit] 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.

Returns

  • The icon associated with this match.

[edit] 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.

Parameters

pm A PackageManager from which the icon can be loaded; usually the PackageManager from which you originally retrieved this item.

Returns

  • Returns a Drawable containing the resolution's icon. If the item does not have an icon, the default activity icon is returned.

[edit] 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.

Parameters

pm A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item.

Returns

  • Returns a CharSequence containing the resolutions's label. If the item does not have a label, its name is returned.

[edit] public String toString()

Answers a string containing a concise, human-readable description of the receiver.

[edit] public void writeToParcel(Parcel dest)

[edit] References

Personal tools