COCOS2D-X SDKBOX In-App Purchase concern

Yeah, that was basically a question for the SDKBox support team. @pabitrapadhy

You could implement a connection check, before calling the IAP logic, but Google IAB service should check that on it’s own and give you a connection error at the IAP screen.

The problem with Google IAB is, that the developer/implementation examples seem to lack a lot of checks, are complex and cannot be easily adopted to take care of every issue.

Thanks iQD, we’ll try to implemented more checks to catch these exceptions, and display warning dialogs to let users know.

As @iQD explained, google analytics will cache events locally when internet is not available.

I am facing some issues.

  • I am getting this issue whenever I call the IAP::purchase(id)
    function.
    "authorization required, you need to sign into your google account"

Can someone guide me?

Check your google play store account and device account, set them to match your test account for in-app purchases.

Hello , I am getting following issue in SDKBox-IAP, I am working on cocos2d-x 3.7.1 , How can I change in .Jar file to remove this:-

FATAL EXCEPTION: GLThread 223
Process: com.blacklight.spidersolitaire, PID: 16491
java.lang.NullPointerException: Attempt to invoke virtual method ‘java.util.Iterator java.util.ArrayList.iterator()’ on a null object reference
at com.sdkbox.plugin.SDKBoxIAPGooglePlay.restorePurchase(SDKBoxIAPGooglePlay.java:257)
at com.sdkbox.plugin.IAPWrapper.nativeOnInitialized(Native Method)
at com.sdkbox.plugin.IAPWrapper.access$000(IAPWrapper.java:9)
at com.sdkbox.plugin.IAPWrapper$1.run(IAPWrapper.java:26)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1501)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1278)

How can we reproduce this issue?

It occurs randomly, but this is very annoying, should I not use SDKBOX:: IAP??

Can you tell me which version SDKBOX iap are you currently integrated with?

i am using sdkbox-iap_v2.2.2.12

Can you try updating to the latest version and see if this issue still persists?

Ok , I will check that, but do you have any clue? why I am having this issue? Because its random

I used latest IAP version , but this is the result from google,

Exceptions
java.lang.NullPointerException
java.lang.NullPointerException: Attempt to invoke virtual method ‘java.util.Iterator java.util.ArrayList.iterator()’ on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method ‘java.util.Iterator java.util.ArrayList.iterator()’ on a null object reference
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException: Attempt to invoke virtual method ‘java.util.Iterator java.util.ArrayList.iterator()’ on a null object reference
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException: Attempt to invoke virtual method ‘java.util.Iterator java.util.ArrayList.iterator()’ on a null object reference
java.lang.NullPointerException
java.lang.NullPointerException
java.lang.NullPointerException: Attempt to invoke virtual method ‘java.util.Iterator java.util.ArrayList.iterator()’ on a null object reference

Can you show me the full call stack?