# CallStaticStringMethod

> Invokes the specified \<tt\>methodID\</tt\> static method on a Java object, optionally passing in an array of arguments (\<tt\>args\</tt\>).

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/7000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AndroidJNIModule

## CallStaticStringMethod(IntPtr, IntPtr, jvalue\[])

Invokes the specified \\\<tt\\>methodID\\\</tt\\> static method on a Java object, optionally passing in an array of arguments (\\\<tt\\>args\\\</tt\\>).

```csharp
public static string CallStaticStringMethod(nint clazz, nint methodID, jvalue[] args)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The Java class on which to call the static method.**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The ID of the method to call.**** (jvalue\[]): An array of arguments to pass to the method.

### Returns

| Type                                                           | Description                                |
| -------------------------------------------------------------- | ------------------------------------------ |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | The managed string returned by the method. |

### Remarks

This is a convenience function that calls CallStaticObjectMethod() with the same parameters, but creates a managed string from the result.

Additional Resources: [AndroidJNI.CallStaticObjectMethod](/engine/7000.0/script-reference/unityengine/androidjni/callstaticobjectmethod.md)

## CallStaticStringMethod(IntPtr, IntPtr, Span\<jvalue>)

Invokes the specified `methodID` static method on a Java object, optionally passing in an array of arguments (`args`).

```csharp
public static string CallStaticStringMethod(nint clazz, nint methodID, Span<jvalue> args)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The Java class on which to call the static method.**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The ID of the method to call.**** (\[Span\<jvalue>]\(https\://learn.microsoft.com/dotnet/api/system.span-1)): An array of arguments to pass to the method.

### Returns

| Type                                                           | Description                                |
| -------------------------------------------------------------- | ------------------------------------------ |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | The managed string returned by the method. |

### Remarks

This is a convenience function that calls `CallStaticObjectMethod()` with the same parameters, but creates a managed string from the result.

Additional Resources: [AndroidJNI.CallStaticObjectMethod](/engine/7000.0/script-reference/unityengine/androidjni/callstaticobjectmethod.md)
