/// <summary> /// Add method argument. /// </summary> /// <param name="arg">method argument</param> /// <returns>Current instance of the class</returns> public JavaRequestBuilder AddArgument(object arg) { var convertedArg = Java.ConvertObjectData(arg); m_Arguments.Add(convertedArg); return(this); }
static void Init() { if (Application.platform != RuntimePlatform.Android) { return; } s_NativeLogger = Java.GetNativeLibraryJavaClass(nameof(AndroidLogger)); SetLogLevel(s_PrintInfo, s_PrintWarning, s_PrintError, false); }
/// <summary> /// Combine all of the options that have been set and invoke native method. /// </summary> public void Invoke() { AndroidLogger.LogJavaMethodCall(m_ClassName, m_MethodName, m_Arguments); if (Application.isEditor) { return; } var javaClass = Java.GetJavaClass(m_ClassName); javaClass.CallStatic(m_MethodName, m_Arguments.ToArray()); }