Partager via


WallpaperManager.GetWallpaperId(WallpaperManagerFlags) Method

Definition

Get the ID of the current wallpaper of the given kind.

[Android.Runtime.Register("getWallpaperId", "(I)I", "GetGetWallpaperId_IHandler", ApiSince=24)]
public virtual int GetWallpaperId (Android.App.WallpaperManagerFlags which);
[<Android.Runtime.Register("getWallpaperId", "(I)I", "GetGetWallpaperId_IHandler", ApiSince=24)>]
abstract member GetWallpaperId : Android.App.WallpaperManagerFlags -> int
override this.GetWallpaperId : Android.App.WallpaperManagerFlags -> int

Parameters

which
WallpaperManagerFlags

The wallpaper whose ID is to be returned. Must be a single defined kind of wallpaper, either #FLAG_SYSTEM or #FLAG_LOCK.

Returns

The positive numeric ID of the current wallpaper of the given kind, or a negative value if no such wallpaper is configured.

Attributes

Remarks

Get the ID of the current wallpaper of the given kind. If there is no such wallpaper configured, returns a negative number.

Every time the wallpaper image is set, a new ID is assigned to it. This method allows the caller to determine whether the wallpaper imagery has changed, regardless of how that change happened.

Java documentation for android.app.WallpaperManager.getWallpaperId(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