Added in API level 7

WallpaperInfo


class WallpaperInfo : Parcelable
kotlin.Any
   ↳ android.app.WallpaperInfo

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

Summary

Inherited constants
Public constructors
WallpaperInfo(context: Context!, service: ResolveInfo!)

Constructor.

Public methods
Int

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

ComponentName!

Return the component of the service that implements this wallpaper.

String!

Return the .

ServiceInfo!

Return the raw information about the Service implementing this wallpaper.

String!

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

String!

Return the class name of an activity that provides a settings UI for the wallpaper.

Uri?

Returns an URI that provides a settings Slice for this wallpaper.

Boolean

Queries whether any metadata should be shown when previewing the wallpaper.

CharSequence!

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

CharSequence!

Retrieves a title of the URI that specifies a link for further context about this wallpaper.

Uri!

Returns an URI that specifies a link for further context about this wallpaper.

CharSequence!

Return a brief summary of this wallpaper's behavior.

Drawable!

Load the user-displayed icon for this wallpaper.

CharSequence!

Load the user-displayed label for this wallpaper.

Drawable!

Load the thumbnail image for this wallpaper.

Boolean

Returns whether this wallpaper should receive default zooming updates when the device changes its state (e.g. when folding or unfolding a foldable device).

Boolean

Returns whether this wallpaper service can support multiple engines to render on each surface independently.

String

Unit
writeToParcel(dest: Parcel, flags: Int)

Used to package this object into a Parcel.

Properties
static Parcelable.Creator<WallpaperInfo!>

Used to make this class parcelable.

Public constructors

WallpaperInfo

Added in API level 7
WallpaperInfo(
    context: Context!,
    service: ResolveInfo!)

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.

Public methods

describeContents

Added in API level 7
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 7
fun dump(
    pw: Printer!,
    prefix: String!
): Unit

getComponent

Added in API level 7
fun getComponent(): ComponentName!

Return the component of the service that implements this wallpaper.

getPackageName

Added in API level 7
fun getPackageName(): String!

Return the .apk package that implements this wallpaper.

getServiceInfo

Added in API level 7
fun getServiceInfo(): ServiceInfo!

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

getServiceName

Added in API level 7
fun getServiceName(): String!

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

getSettingsActivity

Added in API level 7
fun getSettingsActivity(): String!

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 android.content.Intent whose action is MAIN and with an explicit android.content.ComponentName composed of getPackageName and the class name returned here.

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

getSettingsSliceUri

Added in API level 29
fun getSettingsSliceUri(): Uri?

Returns an URI that provides a settings Slice for this wallpaper. The wallpaper should implement a SliceProvider associated with this URI. The system will display the Slice in the customization section while previewing the live wallpaper. Because this URI is accessible to other apps, it is recommended to protect it with the android.permission.BIND_WALLPAPER permission.

null will be returned if there is no settings Slice URI associated with the wallpaper.

Return
Uri? The URI.

getShowMetadataInPreview

Added in API level 25
fun getShowMetadataInPreview(): Boolean

Queries whether any metadata should be shown when previewing the wallpaper. If this value is set to true, any component that shows a preview of this live wallpaper should also show accompanying information like loadLabel, loadDescription, loadAuthor and loadContextDescription(android.content.pm.PackageManager), so the user gets to know further information about this wallpaper.

Return
Boolean Whether any metadata should be shown when previewing the wallpaper.

loadAuthor

Added in API level 7
fun loadAuthor(pm: PackageManager!): CharSequence!

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

loadContextDescription

Added in API level 25
fun loadContextDescription(pm: PackageManager!): CharSequence!

Retrieves a title of the URI that specifies a link for further context about this wallpaper.

Parameters
pm PackageManager!: An instance of PackageManager to retrieve the title.
Return
CharSequence! The title.

loadContextUri

Added in API level 25
fun loadContextUri(pm: PackageManager!): Uri!

Returns an URI that specifies a link for further context about this wallpaper.

Parameters
pm PackageManager!: An instance of PackageManager to retrieve the URI.
Return
Uri! The URI.

loadDescription

Added in API level 7
fun loadDescription(pm: PackageManager!): CharSequence!

Return a brief summary of this wallpaper's behavior.

loadIcon

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

Load the user-displayed icon for this wallpaper.

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

loadLabel

Added in API level 7
fun loadLabel(pm: PackageManager!): CharSequence!

Load the user-displayed label for this wallpaper.

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

loadThumbnail

Added in API level 7
fun loadThumbnail(pm: PackageManager!): Drawable!

Load the thumbnail image for this wallpaper.

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

shouldUseDefaultUnfoldTransition

Added in API level 32
fun shouldUseDefaultUnfoldTransition(): Boolean

Returns whether this wallpaper should receive default zooming updates when the device changes its state (e.g. when folding or unfolding a foldable device). If set to false the wallpaper will not receive zoom events when changing the device state, so it can implement its own transition instead.

This corresponds to the value android.R.styleable#Wallpaper_shouldUseDefaultUnfoldTransition in the XML description of the wallpaper.

The default value is true.

Return
Boolean true if wallpaper should receive default device state change transition updates

supportsMultipleDisplays

Added in API level 29
fun supportsMultipleDisplays(): Boolean

Returns whether this wallpaper service can support multiple engines to render on each surface independently. An example use case is a multi-display set-up where the wallpaper service can render surfaces to each of the connected displays.

This corresponds to the value android.R.styleable#Wallpaper_supportsMultipleDisplays in the XML description of the wallpaper.

The default value is false.

Return
Boolean true if multiple engines can render independently on each surface.

toString

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

writeToParcel

Added in API level 7
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Used to package this object into a Parcel.

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

Properties

CREATOR

Added in API level 7
static val CREATOR: Parcelable.Creator<WallpaperInfo!>

Used to make this class parcelable.