Just to spread a bit of word around the forums.
Myself (martell) and (nickflink) on github are doing work in getting IAP SDKs into plugin-x
You can checkout all code progress here
Android IAP’s have already been merged and it is currently being used in a production game. When I have confirmed the IOS version working in production I will merge that back also.
nickflink has created a basic facebook and twitter sdk wrapper for ios and android.
I hope to build on this further with share, post features etc…
So now we wont have to pay third parties for IAP or social modules
I’ll be tweeting about the progress if anyone wants to follow me to keep up to date
But when I compile, I got error :
[javac] \proj.android\src\org\cocos2dx\cpp\Cocos2dxActivity.java:91: cannot find symbol
[javac] symbol : method getOnActivityResultListeners()
[javac] location: class org.cocos2dx.lib.Cocos2dxHelper
[javac] for (OnActivityResultListener listener : Cocos2dxHelper.getOnActivityResultListeners()) {
[javac] ^
[javac] 1 error
I looked on Cocos2dxHelper, and there is no method Cocos2dxHelper.getOnActivityResultListeners. So I changed to just getOnActivityResultListeners, then it compiled. But now when I invoke share function, I got this error
@siauw I haven’t done that work on the Facebook plugin
I’m sure nick appreciates it though
Yes that link of code must be changed from using org.cocos2dx.lib.Cocos2dxHelper
to your Cocos2dxActivity.java
They have changed a few things recently.
I wanted to have that code in Cocos2dxHelper. Someone tried a pull request with that before but it was never merged.
@siauw It’s been a while since I’ve looked at that code, and mine isn’t actually working right now either. The direction I remember taking is calling that addOnActivityResultListener with the plugin. Then in Cocos2dxActivity, you need to iterate over the list of ActivityResultListeners and do a separate call for each one. That code could be added into the main cocos2dx project, but when mine was working it was in my own activity.
@kslam212003 Have a look at IAPGooglePlay.java in this commit
This is exactly how you do it.
I was waiting for Cocos2dxHelper.java to be merged to cocos2d-x before I could fix this.
Those few line changes should fix your build errors.
I’ll do a PR to plugin-x with an update soon
I think I’ll pass on updating 169 files manually and wait for v3.1.2 or use Java on Android.
This must sound kinda dumb, but having never used github before I felt dumb when it asked for my card details. I assume you all assume everyone has a github account?