Hello everyone,
We have an app where in-app purchasing works perfectly fine for iOS/Apple, however, for Android/Google it does not.
We’ve managed to find that the issue lies with store.canLoadProducts always being false, and unsure why. It seemed as though initializing and using the store for Apple, according to Corona docs, is exactly the same as with Google with the exception of store.init being passed “google” as store type. It doesn’t even hit our loadProductsCallback function, since canLoadProducts is false. Below is the code:
local PRODUCT\_LIST = {--SKUs}; local function transactionCallback(e) --etc end store = require("store"); store.init("google", transactionCallback); timer.performWithDelay(1000, function() if (store.canLoadProducts == true) then store.loadProducts(PRODUCT\_LIST, loadProductsCallback); else native.showAlert("Store Failed", "Cannot load products at this time!", {"Okay"}); end end);
And in build.settings for Android we have:
android = { usesPermissions = { "com.android.vending.BILLING", "android.permission.INTERNET", "android.permission.ACCESS\_WIFI\_STATE", "android.permission.ACCESS\_NETWORK\_STATE", }
So, what more is possibly needed to ensure store.canLoadProducts will be true after store.init? Is the package field when building important to this? Is this or any other area something we should be double checking? We are working in Corona public build 2076.