public static string GetAbsolutePath(this AndroidJavaObject ajo) { if (ajo.GetClassName() != C.JavaIoFile) { Debug.LogError("Trying to get absolute path but object class is not " + C.JavaIoFile); return(string.Empty); } return(ajo.CallStr("getAbsolutePath")); }
public static void CallStaticSafe(this AndroidJavaObject ajo, string methodName, params object[] args) { try { ajo.CallStatic(methodName, args); } catch (Exception e) { GetSocialDebugLogger.Ex(e, string.Format("Failed to call {0} on {1}", methodName, ajo.GetClassName())); } }