WallpaperService.Engine.OnApplyWallpaper(Int32) Method

Definition

Called when the wallpaper preview rendered by this engine is about to be persisted as a selected wallpaper.

[Android.Runtime.Register("onApplyWallpaper", "(I)Landroid/app/wallpaper/WallpaperDescription;", "GetOnApplyWallpaper_IHandler", ApiSince=36)]
public virtual Android.App.Wallpaper.WallpaperDescription? OnApplyWallpaper(int which);
[<Android.Runtime.Register("onApplyWallpaper", "(I)Landroid/app/wallpaper/WallpaperDescription;", "GetOnApplyWallpaper_IHandler", ApiSince=36)>]
abstract member OnApplyWallpaper : int -> Android.App.Wallpaper.WallpaperDescription
override this.OnApplyWallpaper : int -> Android.App.Wallpaper.WallpaperDescription

Parameters

which
Int32

Specifies wallpaper destination: home, lock, or both

Returns

the description of the applied wallpaper, or null if description is unchanged

Attributes

Remarks

Called when the wallpaper preview rendered by this engine is about to be persisted as a selected wallpaper. The returned WallpaperDescription (if any) will be persisted by the system and passed into subsequent calls to WallpaperService#onCreateEngine(WallpaperDescription). This allows the Engine to perform any necessary bookkeeping before a wallpaper being previewed is set on the device, and update the description if necessary.

Java documentation for android.service.wallpaper.WallpaperService.Engine.onApplyWallpaper(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