Hi,
Is anyone else experiencing problems with Google Licensing? I recently updated a couple of apps to include the same licensing code I’ve used in others (which worked) and users have been complaining of errors. My code is as follows… am I missing something? I’ve followed all the code examples / checked the forums and can’t find anything obviously wrong.
if ("Android" == system.getInfo("platformName")) and (system.getInfo("targetAppStore") == "google") and checkLicense == 1 then verifyLicense(); else loadApp(); end
function verifyLicense() local licensing = require "licensing" licensing.init( "google" ) local function licensingListener( event ) local verified = event.isVerified; if (event and (not event.isError) and (not event.isVerified)) then native.showAlert( "Licensing Failed!", "Error message here...", { "OK" } ) else loadApp(); end end licensing.verify( licensingListener ); end
In my build.settings file:
usesPermissions ={ "android.permission.INTERNET", "com.android.vending.CHECK\_LICENSE" },
And in my config.lua:
license = { google = { key = "MY\_KEY\_HERE", }, },
There’s nowhere else I need to add anything as far as I’m aware…?
Thanks,
Ian