| methodName | Specifies which method to call. |
| args | An array of parameters passed to the method. |
Call a static Java method on a class.
// Create a android.os.Binder object and call statich method flushPendingCommands().
function Start() {
var jo = new AndroidJavaObject("android.os.Binder");
jo.CallStatic("flushPendingCommands");
}
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Start() { AndroidJavaObject jo = new AndroidJavaObject("android.os.Binder"); jo.CallStatic("flushPendingCommands"); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def Start() as void: jo as AndroidJavaObject = AndroidJavaObject('android.os.Binder') jo.CallStatic('flushPendingCommands')
| methodName | Specifies which method to call. |
| args | An array of parameters passed to the method. |
Call a static Java method on a class.
// Create a java.lang.String object, and call static method valueOf(float value).
function Start() {
var jo = new AndroidJavaObject("java.lang.String");
var valueString = jo.CallStatic.<string>("valueOf", 42.f);
}
no example available in C#
no example available in Boo