WallpaperManager.Clear Method

Definition

Overloads

Clear()

Remove any currently set system wallpaper, reverting to the system's built-in wallpaper.

Clear(WallpaperManagerFlags)

Remove one or more currently set wallpapers, reverting to the system default display for each one.

Clear()

Remove any currently set system wallpaper, reverting to the system's built-in wallpaper.

[Android.Runtime.Register("clear", "()V", "GetClearHandler")]
[Android.Runtime.RequiresPermission("android.permission.SET_WALLPAPER")]
public virtual void Clear ();
[<Android.Runtime.Register("clear", "()V", "GetClearHandler")>]
[<Android.Runtime.RequiresPermission("android.permission.SET_WALLPAPER")>]
abstract member Clear : unit -> unit
override this.Clear : unit -> unit
Attributes

Exceptions

If an error occurs reverting to the built-in wallpaper.

Remarks

Remove any currently set system wallpaper, reverting to the system's built-in wallpaper. On success, the intent Intent#ACTION_WALLPAPER_CHANGED is broadcast.

This method requires the caller to hold the permission android.Manifest.permission#SET_WALLPAPER.

Java documentation for android.app.WallpaperManager.clear().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Clear(WallpaperManagerFlags)

Remove one or more currently set wallpapers, reverting to the system default display for each one.

[Android.Runtime.Register("clear", "(I)V", "GetClear_IHandler", ApiSince=24)]
[Android.Runtime.RequiresPermission("android.permission.SET_WALLPAPER")]
public virtual void Clear (Android.App.WallpaperManagerFlags which);
[<Android.Runtime.Register("clear", "(I)V", "GetClear_IHandler", ApiSince=24)>]
[<Android.Runtime.RequiresPermission("android.permission.SET_WALLPAPER")>]
abstract member Clear : Android.App.WallpaperManagerFlags -> unit
override this.Clear : Android.App.WallpaperManagerFlags -> unit

Parameters

which
WallpaperManagerFlags

A bitwise combination of #FLAG_SYSTEM or #FLAG_LOCK

Attributes

Remarks

Remove one or more currently set wallpapers, reverting to the system default display for each one. If #FLAG_SYSTEM is set in the which parameter, the intent Intent#ACTION_WALLPAPER_CHANGED will be broadcast upon success.

Java documentation for android.app.WallpaperManager.clear(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to