Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Invoke(methodName: string, args: object[]): AndroidJavaObject;
AndroidJavaObject Invoke(string methodName, object[] args);
def Invoke(methodName as string, args as object[]) as AndroidJavaObject
Invoke(methodName: string, javaArgs: AndroidJavaObject[]): AndroidJavaObject;
AndroidJavaObject Invoke(string methodName, AndroidJavaObject[] javaArgs);
def Invoke(methodName as string, javaArgs as AndroidJavaObject[]) as AndroidJavaObject

Parameters

methodNameName of the invoked java method.
argsArguments passed from the java vm - converted into AndroidJavaObject, AndroidJavaClass or a primitive.
javaArgsArguments passed from the java vm - all objects are represented by AndroidJavaObject, int for instance is represented by a java.lang.Integer object.

Description

Called by the java vm whenever a method is invoked on the java proxy interface. You can override this to run special code on method invokation, or you can leave the implementation as is, and leave the default behavior which is to look for c# methods matching the signature of the java method.