语言

WallpaperManager.SendWallpaperCommand 方法

定义

将任意命令发送到当前活动壁纸。

[Android.Runtime.Register("sendWallpaperCommand", "(Landroid/os/IBinder;Ljava/lang/String;IIILandroid/os/Bundle;)V", "GetSendWallpaperCommand_Landroid_os_IBinder_Ljava_lang_String_IIILandroid_os_Bundle_Handler")]
[Android.Runtime.RequiresPermission("android.permission.ALWAYS_UPDATE_WALLPAPER")]
public virtual void SendWallpaperCommand(Android.OS.IBinder? windowToken, string? action, int x, int y, int z, Android.OS.Bundle? extras);
[<Android.Runtime.Register("sendWallpaperCommand", "(Landroid/os/IBinder;Ljava/lang/String;IIILandroid/os/Bundle;)V", "GetSendWallpaperCommand_Landroid_os_IBinder_Ljava_lang_String_IIILandroid_os_Bundle_Handler")>]
[<Android.Runtime.RequiresPermission("android.permission.ALWAYS_UPDATE_WALLPAPER")>]
abstract member SendWallpaperCommand : Android.OS.IBinder * string * int * int * int * Android.OS.Bundle -> unit
override this.SendWallpaperCommand : Android.OS.IBinder * string * int * int * int * Android.OS.Bundle -> unit

参数

windowToken
IBinder

IBinder:应与这些偏移量关联的窗口,由 View.getWindowToken(返回)。

action
String

字符串:要执行的命令的名称。 这必须是一个作用域名称,以避免冲突,例如“com.mycompany.wallpaper.DOIT”。

x
Int32

int:基于命令的任意整数参数。

y
Int32

int:基于命令的任意整数参数。

z
Int32

int:基于命令的任意整数参数。

extras
Bundle

捆绑包:命令的可选附加信息,或为 null。

特性

注解

将任意命令发送到当前活动壁纸。

Android 参考。android.app.WallpaperManager.sendWallpaperCommand

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于