My code works fine when built using the simulator, but on Enterprise builds the store always fails to load correctly.
In my AndroidManifest.xml file I have the following permissions:
\<uses-permission android:name="com.android.vending.BILLING" /\> \<uses-permission android:name="com.android.vending.CHECK\_LICENSE" /\>
In my code, I have this piece of code which checks whether I can load products or not:
local store = require("store") function onIAP( event ) print("onIAP") end if globals.OS == "Android" then store.target = "google" store = require("plugin.google.iap.v3") print("ready to init store google...") store.init("google", onIAP) print("...initialized") end if store.isActive then if store.canLoadProducts then print("can load products") else print("can NOT load products") end end
The prints on either side of store.init both print, and the store.isActive returns true, but store.canLoadProducts is always returned as false for some reason. It could be that store.init doesn’t actually get called succesfully, there are no messages either way in adb that tell me whether it was successful or not.
I’m using plugin.google.iap.v3.jar (and I’ve also got google-play-services.jar included for other plugins, just in case that’s needed). There are no other jar files for IAP v3 when I download the enterprise plugins folder.
Is there something else I need to include somewhere that I’ve overlooked?