// /********************** // Query Methods // **********************/ public static void GetVirtualCurrencies(VirtualCurrency.GetVirtualCurrencyArrayFinished callback) { if (javaUnityApplicasaIAP == null) { javaUnityApplicasaIAP = new AndroidJavaClass("com.applicasaunity.Unity.ApplicasaIAP"); } Error error; error.Id = 1; error.Message = "Success"; AndroidJavaObject virtualCurrencyArrayJava = javaUnityApplicasaIAP.CallStatic <AndroidJavaObject>("ApplicasaIAPGetVirtualCurrenciesWithBlock"); VirtualCurrency.VirtualCurrencyArray virtualCurrencyArray = new VirtualCurrency.VirtualCurrencyArray(); virtualCurrencyArray.Array = virtualCurrencyArrayJava.GetRawObject(); AndroidJavaObject[] convertedArray = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(virtualCurrencyArray.Array); int count = 0; for (int i = 0; i < convertedArray.Length; i++) { AndroidJavaObject[] temp = AndroidJNIHelper.ConvertFromJNIArray <AndroidJavaObject[]>(convertedArray[i].GetRawObject()); count += temp.Length; } virtualCurrencyArray.ArraySize = count; convertedArray = null; callback(true, error, virtualCurrencyArray); }
public static void GetVirtualCurrencies(VirtualCurrency.GetVirtualCurrencyArrayFinished callback) { ApplicasaIAPGetVirtualCurrenciesWithBlock(callback); }
private static extern void ApplicasaIAPGetVirtualCurrenciesWithBlock(VirtualCurrency.GetVirtualCurrencyArrayFinished callback);
// /********************** // Query Methods // **********************/ public static void GetVirtualCurrencies(VirtualCurrency.GetVirtualCurrencyArrayFinished callback) { callback(true, new Error(), new VirtualCurrency.VirtualCurrencyArray()); }