Android Guides | Samples

Android.App.WallpaperManager Class

Provides access to the system wallpaper.

See Also: WallpaperManager

Syntax

[Android.Runtime.Register("android/app/WallpaperManager", DoNotGenerateAcw=true)]
public class WallpaperManager : Object

Remarks

Provides access to the system wallpaper. With WallpaperManager, you can get the current wallpaper, get the desired dimensions for the wallpaper, set the wallpaper, and more. Get an instance of WallpaperManager with WallpaperManager.GetInstance(Context).

An app can check whether wallpapers are supported for the current user, by calling WallpaperManager.IsWallpaperSupported.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 5

The members of Android.App.WallpaperManager are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
ActionChangeLiveWallpaperString. Directly launch live wallpaper preview, allowing the user to immediately confirm to switch to a specific live wallpaper.
const
ActionCropAndSetWallpaperString. Activity Action: Show settings for choosing wallpaper.
const
ActionLiveWallpaperChooserString. Launch an activity for the user to pick the current global live wallpaper.
const
CommandDropString. Command for WallpaperManager.SendWallpaperCommand(IBinder,String,String,String,String,String): reported by the wallpaper host when the user drops an object into an area of the host.
const
CommandSecondaryTapString. Command for WallpaperManager.SendWallpaperCommand(IBinder,String,String,String,String,String): reported by the wallpaper host when the user releases a secondary pointer on an empty area (not performing an action in the host).
const
CommandTapString. Command for WallpaperManager.SendWallpaperCommand(IBinder,String,String,String,String,String): reported by the wallpaper host when the user taps on an empty area (not performing an action in the host).
const
ExtraLiveWallpaperComponentString. Extra in WallpaperManager.ActionChangeLiveWallpaper that specifies the ComponentName of a live wallpaper that should be shown as a preview, for the user to confirm.
const
WallpaperPreviewMetaDataString. Manifest entry for activities that respond to Intent.ActionSetWallpaper which allows them to provide a custom large icon associated with this action.

Public Properties

[read-only]
BuiltInDrawableDrawable. Returns a drawable for the system built-in static wallpaper .
[read-only]
DesiredMinimumHeightInt32. Returns the desired minimum height for the wallpaper.
[read-only]
DesiredMinimumWidthInt32. Returns the desired minimum width for the wallpaper.
[read-only]
DrawableDrawable. Retrieve the current system wallpaper; if no wallpaper is set, the system built-in static wallpaper is returned.
[read-only]
FastDrawableDrawable. Like WallpaperManager.Drawable, but the returned Drawable has a number of limitations to reduce its overhead as much as possible.
[read-only]
WallpaperInfoWallpaperInfo. If the current wallpaper is a live wallpaper component, return the information about that wallpaper.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Clear()
Remove any currently set wallpaper, reverting to the system's built-in wallpaper.
ClearWallpaperOffsets(IBinder)
Clear the offsets previously associated with this window through WallpaperManager.SetWallpaperOffsets(IBinder,Single,Single).
ForgetLoadedWallpaper()
Remove all internal references to the last loaded wallpaper.
GetBuiltInDrawable(Int32, Int32, Boolean, Single, Single) : Drawable
Returns a drawable for the system built-in static wallpaper.
GetCropAndSetWallpaperIntent(Uri) : Intent
Gets an Intent that will launch an activity that crops the given image and sets the device's wallpaper.
static
GetInstance(Context) : WallpaperManager
Retrieve a WallpaperManager associated with the given Context.
HasResourceWallpaper(Int32) : Boolean
Return whether any users are currently set to use the wallpaper with the given resource ID.
PeekDrawable() : Drawable
Retrieve the current system wallpaper; if there is no wallpaper set, a null pointer is returned.
PeekFastDrawable() : Drawable
Like WallpaperManager.FastDrawable, but if there is no wallpaper set, a null pointer is returned.
SendWallpaperCommand(IBinder, String, Int32, Int32, Int32, Bundle)
Send an arbitrary command to the current active wallpaper.
SetBitmap(Bitmap)
Change the current system wallpaper to a bitmap.
SetResource(Int32)
Change the current system wallpaper to the bitmap in the given resource.
SetStream(Stream)
Change the current system wallpaper to a specific byte stream.
SetWallpaperOffsets(IBinder, Single, Single)
Set the position of the current wallpaper within any larger space, when that wallpaper is visible behind the given window.
SetWallpaperOffsetSteps(Single, Single)
For applications that use multiple virtual screens showing a wallpaper, specify the step size between virtual screens.
SuggestDesiredDimensions(Int32, Int32)
For use only by the current home application, to specify the size of wallpaper it would like to use.