Hi all,
I am trying to use licensing module as shown below.
I built the apk and uploaded to Internal test track (under App releases) and then began to test using adb tool. The problem is licensingInit always returns false.
Not sure what I am doing wrong or if I need to do some other setup. Did I miss any other step? Can anyone please help me with this.
I activated the Google Play Games Services v2 plugin from marketplace as well.
local gpgs = require( "plugin.gpgs.v2" )
local licensing = require( "licensing" )
local function licensingListener( event )
if not ( event.isVerified ) then
print("Verify: False")
else
print("Verify: True")
end
end
local licensingInit = licensing.init( "google" )
print ("licensingInit", licensingInit)
if ( licensingInit == true ) then
licensing.verify( licensingListener )
end
build.settings:
settings= {
plugins =
{
["plugin.gpgs.v2"] =
{
publisherId = "com.coronalabs",
supportedPlatforms = { android=true }
},
},
android =
{
googlePlayGamesAppId = "*************",
usesPermissions =
{
"com.android.vending.BILLING",
"com.android.vending.CHECK_LICENSE",
"android.permission.INTERNET",
"android.permission.WRITE_EXTERNAL_STORAGE",
"android.permission.ACCESS_NETWORK_STATE",
},
},
}
config.lua
application =
{
content = {
width = 450,
height = 900,
scale = "letterbox"
},
license =
{
google =
{
key = "long key ...",
policy = "serverManaged"
},
},
}