I should have asked this BEFORE starting with Gideros... But now the app is almost done anyway...
So, how I do IAP? What I want to do is that you download the full app, and use IAP to unlock the demo version to full version (our game is a story-based game, you will see roughly 2/7 of the story, and then must pay to see the remaing 5/7)
Comments
Upon app start you load values and check if game is unlocked
Upon IAP purchase you store value true to unlock the game there
Additionally you may choose to encrypt this file (there are plenty of lua based encryption libs/modules, most probably some members can suggest something).
But if you mean from implementation point of view, then go to Gideros Labs and download IAB interface:
http://giderosmobile.com/labs/iab
It provides store detection and same interface and workflow for different stores.
The docs and state of stores can be seen here:
http://docs.giderosmobile.com/interface/iab
And here is a draft code to support GooglePlay, Amazon and IOS
I'm trying to get IAB working but I have one issue that I'm not sure how to resolve.
I have followed the installation instructions (on Github) and I've also double checked all the lib and src files. The APK compiles without any errors but when I install it on a device it crashes. The reason for the crash is on:
I also noticed that the instructions specifically for Google billing are as follows:
Google
src\com\android\vending\billing folder
src\com\giderosmobile\android\plugins\iab\google folder
src\com\giderosmobile\android\plugins\iab\IabGoogle.java
However, the files are located in the frameworks folder. Is this correct?
Should it be?:
Google
src\com\android\vending\billing folder
src\com\giderosmobile\android\plugins\iab\frameworks\google folder
src\com\giderosmobile\android\plugins\iab\frameworks\IabGoogle.java
Many thanks in advance.
PS. I will be testing Fortumo in the future so I will be more than happy to tell you about my experience.
Have you loaded iap library from main Activity: System.loadLibrary("iap")?
I created a new export from Gideros and after I added the IAB plugin. This resolved my issue. I must have messed up the previous project some how. At the moment I only have the IAB plugin but I need to add flurry and ads plugin to completely test everything.
Now prefix with app bundle id is not needed, you only have to provide the product ID as Google does. You can test the list of products in your device emulator from Xcode.