Android is essentially the same. You define the products you wish to be purchasable for the app via the "In-app Products" section of the Google Play dashboard. You give each a title, unique identifier, price, and short description. You also specify if you want it to be managed, unmanaged or a subscription. Then you use the same exact calls in AppGameKit Tier 1 to interact with the in-app purchases as you would on iOS.
First you set up the purchasable products for later use (I would recommend doing this when your app first loads).
// In-app Purchase Data
InAppPurchaseSetTitle ("MyApp")
InAppPurchaseAddProductID ("com.yourcompany.yourapp.iap", 0)
InAppPurchaseSetup()
Replace MyApp with the title of your app as you want it to appear on any related dialogs that may appear when purchasing a product.
Replace com.yourcompany.yourapp.iap with the unique product ID you defined on the Google Play dashboard as I described earlier. The 0 parameter indicates it is a managed product.
Then, when the user requests to purchase a particular product, you call:
// Request to purchase upgrade from store
InAppPurchaseActivate(0)
// Wait for user to purchase or cancel
While GetInAppPurchaseState() = 0
Sync()
EndWhile
// User has successfully purchased item
If GetInAppPurchaseAvailable(0)
// insert code to upgrade or unlock app here.
Endif
The 0 parameter above corresponds to the first product you defined, 1 would be the second product if you define more than one, etc.
When the app first loads, after initializing the InAppPurchase data as I explained, you can call GetInAppPurchaseAvailable(0) to see if the user has previously purchased the upgrade and react accordingly.
The most complicated part is that you must create the In App product on Google and set it to ready, and then build the final APK of your app and upload it to Google (but you can keep it's state as Unpublished). It can take some time before the uploaded binary is seen by Google and the In App product, so it can take a lot of time to test everything and you cannot test IAP via the AppGameKit Player itself. You must be using the same APK on your Android device as the one that has been uploaded.