AndroidApp.Invoke Method

Definition

Overloads

Invoke(String, Object)

Invokes a method on the app's main activity. For Xamarin apps, methods must be exposed using attributes as shown below.

Android example in activity:

[Export]
public string MyInvokeMethod(string arg)
{
    return "uitest";
}
Invoke(String, Object[])

Invokes a method on the app's main activity. For Xamarin apps, methods must be exposed using attributes as shown below.

Android example in activity:

[Export]
public string MyInvokeMethod(string arg, string arg2)
{
    return "uitest";
}

Invoke(String, Object)

Invokes a method on the app's main activity. For Xamarin apps, methods must be exposed using attributes as shown below.

Android example in activity:

[Export]
public string MyInvokeMethod(string arg)
{
    return "uitest";
}
public object Invoke (string methodName, object argument = null);
abstract member Invoke : string * obj -> obj
override this.Invoke : string * obj -> obj
Public Function Invoke (methodName As String, Optional argument As Object = null) As Object

Parameters

methodName
String

The name of the method to invoke.

argument
Object

The argument to pass to the method.

Returns

The result of the invocation.

Implements

Applies to

Invoke(String, Object[])

Invokes a method on the app's main activity. For Xamarin apps, methods must be exposed using attributes as shown below.

Android example in activity:

[Export]
public string MyInvokeMethod(string arg, string arg2)
{
    return "uitest";
}
public object Invoke (string methodName, object[] arguments);
abstract member Invoke : string * obj[] -> obj
override this.Invoke : string * obj[] -> obj
Public Function Invoke (methodName As String, arguments As Object()) As Object

Parameters

methodName
String

The name of the method to invoke.

arguments
Object[]

An array of arguments to pass to the method.

Returns

The result of the invocation.

Implements

Applies to