Skip to content

Instantly share code, notes, and snippets.

@webmonch
Created March 25, 2015 23:02
Show Gist options
  • Save webmonch/c268a33ce7878eee19bc to your computer and use it in GitHub Desktop.
Save webmonch/c268a33ce7878eee19bc to your computer and use it in GitHub Desktop.
protected override int _add(VirtualItem item, int amount, bool notify){
Debug.Log("To notify? " + notify);
int retBalance;
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniStorageManager = new AndroidJavaClass("com.soomla.store.data.StorageManager")) {
using(AndroidJavaObject jniVCStorage = jniStorageManager.CallStatic<AndroidJavaObject>("getVirtualCurrencyStorage")) {
Debug.Log(">>>>>>>>before call");
retBalance = jniVCStorage.Call<int>("add", item.ItemId, amount, notify);
Debug.Log(">>>>>>>>after call");
}
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
Debug.Log(">>>>>>>>ADD END");
return retBalance;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment