AndroidJavaObject.CallStatic 静态调用


function CallStatic (methodName : string, params args : object[]) : void

Parameters参数

  • className
    Specifies which method to call.
       指定的方法被调用
  • args
    An array of parameters passed to the method.
       参数的数组传递到方法

Description描述

Call a static Java method on a class.

调用一个静态Java方法。

To call a static method with return type 'void', use the regular version.

调用一个静态方法,返回类型为void,使用普通版本。

// Create a android.os.Binder object and call statich method flushPendingCommands().//创建一个android.os.Binder对象并调用静态方法flushPendingCommands().function Start() {var jo = new AndroidJavaObject("android.os.Binder");jo.CallStatic("flushPendingCommands");}


,