[SOLVED] [IAP - Android] onSuccess not being triggered

Yes, I did, sorry we were busy work on some issues, I’ll take a look at it ASAP.

So I looked at your code, I wasn’t able to get it running without significant change. But I have a question, where do you initialize _iapListener?

It has to be a new MyIAPListener somewhere…

No need, my instance of MyIAPListener is an attribute of CoinsManager :

// plugin listener
CoinsManager::MyIAPListener _iapListener;

It’s an object, it’s not a pointer on an object so when i declare it this way, it automatically calls the default constructor (and as MyIAPListener inherit from IAPListener it also call automatically IAPListener default constructor…).

Hi, i’ve spent many hours on this problem, still no idea what’s going on :frowning:
That’s very frustrating and i will have to disable inapp on android :confused:

Hi, do you have the whole onActivity method code to show?

thx!

Here is the onActivity code, I think it must be some minor mistake somewhere. In your implementation. Maybe modified the wrong activity?

Maybe we can schedule a skype meeting so I can take a look?

@klems @nite did u figured it out? I have the same problem, purchase is ok, i receive the email of the order, etc. But no callback.

Solved. I was using an old sdkbox core library with the latest iap library.

1 Like

I’m facing the same problem , I’ve looked into the cocos2dActivity.java code … it’s all the same …
has anybody figured it out ?

Maybe try double check your sdkbox.jar is the latest version. You can find the plugin package under ~/.sdkbox/plugins/

@nite
IAP version 2.3.13.5

plz check the md5 of the jar files in your project:

~/.sdkbox/plugins/sdkbox-iap_v2.3.13.5/plugin/android/libs$ md5 PluginIAP.jar sdkbox.jar PluginGooglePlay.jar
MD5 (PluginIAP.jar) = f5ee05dd3b2e0b7b1e60d45bec16a716
MD5 (sdkbox.jar) = 3e199eee056dd822affa963d230a0da0
MD5 (PluginGooglePlay.jar) = 299abe15b65aaacb18dd88dadacfdf41

@yinjimmy … they are All the same , Thanks for helping :slight_smile:

It’s triggered finally and i don’t know how actually , the question I’m asking how to keep data even if the user cleared the cache or the data from the phone storage ?

You can save the data to iCloud/Google play with the new cloud save function in SDKBOX play

1 Like