Udostępnij za pośrednictwem


WallpaperService.Engine.OnCommand Method

Definition

Process a command that was sent to the wallpaper with WallpaperManager#sendWallpaperCommand.

[Android.Runtime.Register("onCommand", "(Ljava/lang/String;IIILandroid/os/Bundle;Z)Landroid/os/Bundle;", "GetOnCommand_Ljava_lang_String_IIILandroid_os_Bundle_ZHandler")]
public virtual Android.OS.Bundle? OnCommand (string? action, int x, int y, int z, Android.OS.Bundle? extras, bool resultRequested);
[<Android.Runtime.Register("onCommand", "(Ljava/lang/String;IIILandroid/os/Bundle;Z)Landroid/os/Bundle;", "GetOnCommand_Ljava_lang_String_IIILandroid_os_Bundle_ZHandler")>]
abstract member OnCommand : string * int * int * int * Android.OS.Bundle * bool -> Android.OS.Bundle
override this.OnCommand : string * int * int * int * Android.OS.Bundle * bool -> Android.OS.Bundle

Parameters

action
String

The name of the command to perform. This tells you what to do and how to interpret the rest of the arguments.

x
Int32

Generic integer parameter.

y
Int32

Generic integer parameter.

z
Int32

Generic integer parameter.

extras
Bundle

Any additional parameters.

resultRequested
Boolean

If true, the caller is requesting that a result, appropriate for the command, be returned back.

Returns

If returning a result, create a Bundle and place the result data in to it. Otherwise return null.

Attributes

Remarks

Process a command that was sent to the wallpaper with WallpaperManager#sendWallpaperCommand. The default implementation does nothing, and always returns null as the result.

Java documentation for android.service.wallpaper.WallpaperService.Engine.onCommand(java.lang.String, int, int, int, android.os.Bundle, boolean).

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