Android APIs
public final class

WallpaperInfo

extends Object
implements Parcelable
java.lang.Object
   ↳ android.app.WallpaperInfo

Class Overview

This class is used to specify meta information of a wallpaper service.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<WallpaperInfo> CREATOR Used to make this class parcelable.
Public Constructors
WallpaperInfo(Context context, ResolveInfo service)
Constructor.
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
void dump(Printer pw, String prefix)
ComponentName getComponent()
Return the component of the service that implements this wallpaper.
String getPackageName()
Return the .apk package that implements this wallpaper.
ServiceInfo getServiceInfo()
Return the raw information about the Service implementing this wallpaper.
String getServiceName()
Return the class name of the service component that implements this wallpaper.
String getSettingsActivity()
Return the class name of an activity that provides a settings UI for the wallpaper.
CharSequence loadAuthor(PackageManager pm)
Return a string indicating the author(s) of this wallpaper.
CharSequence loadDescription(PackageManager pm)
Return a brief summary of this wallpaper's behavior.
Drawable loadIcon(PackageManager pm)
Load the user-displayed icon for this wallpaper.
CharSequence loadLabel(PackageManager pm)
Load the user-displayed label for this wallpaper.
Drawable loadThumbnail(PackageManager pm)
Load the thumbnail image for this wallpaper.
String toString()
Returns a string containing a concise, human-readable description of this object.
void writeToParcel(Parcel dest, int flags)
Used to package this object into a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<WallpaperInfo> CREATOR

Added in API level 7

Used to make this class parcelable.

Public Constructors

public WallpaperInfo (Context context, ResolveInfo service)

Added in API level 7

Constructor.

Parameters
context Context: The Context in which we are parsing the wallpaper.
service ResolveInfo: The ResolveInfo returned from the package manager about this wallpaper's component.
Throws
XmlPullParserException
IOException

Public Methods

public int describeContents ()

Added in API level 7

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
int a bitmask indicating the set of special object types marshalled by the Parcelable.

public void dump (Printer pw, String prefix)

Added in API level 7

Parameters
pw Printer
prefix String

public ComponentName getComponent ()

Added in API level 7

Return the component of the service that implements this wallpaper.

Returns
ComponentName

public String getPackageName ()

Added in API level 7

Return the .apk package that implements this wallpaper.

Returns
String

public ServiceInfo getServiceInfo ()

Added in API level 7

Return the raw information about the Service implementing this wallpaper. Do not modify the returned object.

Returns
ServiceInfo

public String getServiceName ()

Added in API level 7

Return the class name of the service component that implements this wallpaper.

Returns
String

public String getSettingsActivity ()

Added in API level 7

Return the class name of an activity that provides a settings UI for the wallpaper. You can launch this activity be starting it with an Intent whose action is MAIN and with an explicit ComponentName composed of getPackageName() and the class name returned here.

A null will be returned if there is no settings activity associated with the wallpaper.

Returns
String

public CharSequence loadAuthor (PackageManager pm)

Added in API level 7

Return a string indicating the author(s) of this wallpaper.

Parameters
pm PackageManager
Returns
CharSequence
Throws
Resources.NotFoundException

public CharSequence loadDescription (PackageManager pm)

Added in API level 7

Return a brief summary of this wallpaper's behavior.

Parameters
pm PackageManager
Returns
CharSequence
Throws
Resources.NotFoundException

public Drawable loadIcon (PackageManager pm)

Added in API level 7

Load the user-displayed icon for this wallpaper.

Parameters
pm PackageManager: Supply a PackageManager used to load the wallpaper's resources.
Returns
Drawable

public CharSequence loadLabel (PackageManager pm)

Added in API level 7

Load the user-displayed label for this wallpaper.

Parameters
pm PackageManager: Supply a PackageManager used to load the wallpaper's resources.
Returns
CharSequence

public Drawable loadThumbnail (PackageManager pm)

Added in API level 7

Load the thumbnail image for this wallpaper.

Parameters
pm PackageManager: Supply a PackageManager used to load the wallpaper's resources.
Returns
Drawable

public String toString ()

Added in API level 7

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

   getClass().getName() + '@' + Integer.toHexString(hashCode())

See Writing a useful toString method if you intend implementing your own toString method.

Returns
String a printable representation of this object.

public void writeToParcel (Parcel dest, int flags)

Added in API level 7

Used to package this object into a Parcel.

Parameters
dest Parcel: The Parcel to be written.
flags int: The flags used for parceling.