Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Problem in adding Inn-app-purchase plugin — Gideros Forum

Problem in adding Inn-app-purchase plugin

aimoiaimoi Member
edited September 2015 in General questions
Hi,
This is simple I know, but I couldn't figure out how to start using IAP plugin in my project.
Every where on "How to install In App Billing Interface" I get
Copy libs folder into your exported project
Copy src folder into your exported project
Add System.loadLibrary("iab"); to your main activity
Add "com.giderosmobile.android.plugins.iab.Iab" as external class in your main activity
But that's not the case, I want to add the plugin to my project first via "require" keyword and I get
main.lua:12: module 'iab' not found:
	no field package.preload['iab']
	no file '.\iab.lua'
	no file 'C:\Program Files (x86)\Gideros\lua\iab.lua'
	no file 'C:\Program Files (x86)\Gideros\lua\iab\init.lua'
	no file 'C:\Program Files (x86)\Gideros\iab.lua'
	no file 'C:\Program Files (x86)\Gideros\iab\init.lua'
	no file '.\iab.dll'
	no file 'C:\Program Files (x86)\Gideros\iab.dll'
	no file 'C:\Program Files (x86)\Gideros\loadall.dll'
So basically my question is about how to add plugins to my code?
I know the sources of "IAP" plugins are at "All plugins" folder, but I don't know what to do with them to initiate using them. Also I can't find any "iab.lua" or "init.lua" related to "IAP". And I prefer to be able to test my IAP on the gideros Player rather than by "apk" file.

Thanks in advance. (;

Comments

  • totebototebo Member
    edited September 2015
    You have to build a player with IAB included before you can test it. Also, the player id needs to be the same as your project on Google Play or iTunes (ie. Something like "com.totebo.game").

    On Android it's easy, just remove the assets folder to make a player apk.

    On iOS you have to rename the project in XCode by double clicking (slowly) the project name, then change the id.
    My Gideros games: www.totebo.com
  • @totebo
    sorry, I didn't get it.
    First, how should I solve this:
    main.lua:12: module 'iab' not found:
    	no field package.preload['iab']
    	no file '.\iab.lua'
    	no file 'C:\Program Files (x86)\Gideros\lua\iab.lua'
    	no file 'C:\Program Files (x86)\Gideros\lua\iab\init.lua'
    	no file 'C:\Program Files (x86)\Gideros\iab.lua'
    	no file 'C:\Program Files (x86)\Gideros\iab\init.lua'
    	no file '.\iab.dll'
    	no file 'C:\Program Files (x86)\Gideros\iab.dll'
    	no file 'C:\Program Files (x86)\Gideros\loadall.dll'
    Second, can you explain more about how I can make a "a player with IAB included"? I don't know even what are you talking about.
  • totebototebo Member
    Accepted Answer
    Sorry, not at my computer, but to test things like IAB you'll need to build a Gideros player that you run on your device. If it's Android all you need to do is export your game, open it in Eclipse and remove the Assets folder. Then install IAB and build the APK and install on the device. Voila!

    Niclas
    My Gideros games: www.totebo.com
    +1 -1 (+2 / -0 )Share on Facebook
  • totebototebo Member
    Accepted Answer
    To clarify, you can't use IAB foor Google Play (or any other Google Play services) on the desktop player. You have to test on an Android device.

    Likes: aimoi

    My Gideros games: www.totebo.com
    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.