getting “Error contacting server” when licensing.init( “google” ) ???
I had just run my test app on my Android device and it was working fine re “licensing.init( “google” )”. Then I rebuilt it with no changes just to make sure I was on the latest build. I now get the “Error contacting server” each time now, as if in recent times there has been a bug introduced.
Is anyone else getting this error?
My test output & test code I used:
I/Corona ( 5119): . V/Corona ( 5119): \> Class.forName: network.LuaLoader V/Corona ( 5119): \< Class.forName: network.LuaLoader V/Corona ( 5119): Loading via reflection: network.LuaLoader V/Corona ( 5119): \> Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona ( 5119): \< Class.forName: CoronaProvider.licensing.google.LuaLoader V/Corona ( 5119): Loading via reflection: CoronaProvider.licensing.google.LuaLoader I/Corona ( 5119): WARNING: licensing.init() was already called for google. I/Corona ( 5119): . I/Corona ( 5119): . I/Corona ( 5119): I/Corona ( 5119): Called licensing.verify I/Corona ( 5119): . I/Corona ( 5119): licensingListener - start I/Corona ( 5119): I/Corona ( 5119): isError = true I/Corona ( 5119): isVerified = false I/Corona ( 5119): name = licensing I/Corona ( 5119): errorType = network I/Corona ( 5119): provider = google I/Corona ( 5119): expiration = 0 I/Corona ( 5119): expansionFiles = table: 0x2462c8 I/Corona ( 5119): response = Error contacting server I/Corona ( 5119): .
local widget = require( "widget" ) display.setStatusBar( display.HiddenStatusBar ) -- Status Text local text = display.newText("About to Call Google Play", 0, 0, display.contentWidth, display.contentHeight, native.systemFont, 20 ) text:setTextColor(255, 0, 0) function updateDisplay(newText) text.text = text.text .. newText print(newText) end local function licensingListener( event ) updateDisplay("licensingListener - start") updateDisplay("\n") for k,item in pairs(event) do updateDisplay(k .. " = " .. tostring(item) .. "\n") end end -- Call Google local licensing = require( "licensing" ) licensing.init( "google" ) -- Status Indicator Updating timer.performWithDelay( 2000, function(event) updateDisplay(".") end, 0 ) -- Button to Initiate local myButton = widget.newButton { left = 10, top = display.contentHeight \* 0.8, width = display.contentWidth - 20, height = display.contentHeight \* 0.2, id = "button\_1", label = "Push to Initiate Verify", onRelease = function(event) licensing.verify( licensingListener ) updateDisplay("\nCalled licensing.verify") end }