Hi all,
I’m currently trying to get Google Play Game Services to work with Corona SDK. But it seems to me that I have an odd issue:
I have a Samsung Tablet SM-T520 (Android 4.4.2) and my implementation works just fine. I can connect to the gameNetwork just normal.
However on my Samsung S6 (Android 6.0.1) it does not work at all. I only get the isError variable set to true.
Using logcat I do get the following Error message from google:
28062 28104 E GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
The S6 can’t connect at all.
I do not get any further information on any error Code or error message those values are always nil.
Thank you very much for your help!
My implementation looks like this:
local lGameNetwork = require( "gameNetwork" ) local inspect = require('inspect') local function gameLoginCallback( event ) print("gameLoginCallback") --print(inspect(event)) print( "gameLoginCallback-event.errorMessage", event.errorMessage ) print( "gameLoginCallback-Error Code:", event.errorCode ) end local function gameRequestCallback( event ) --print(inspect(event)) if event.name == "init" then lGameNetwork.request( "login", { userInitiated = true, listener = gameLoginCallback } ) end print( "gameRequestCallback-event.errorMessage", event.errorMessage ) print( "gameRequestCallback-Error Code:", event.errorCode ) end function setUpGameNetwork() print("setUpGameNetwork") if lGameNetwork.request("isConnected") then return end print("globalGameNetwork.init") lGameNetwork.init( "google", gameRequestCallback ) print("globalGameNetwork inspect") --print(inspect(lGameNetwork)) end function gameNetworkIsConnected() local gnc = lGameNetwork.request("isConnected") print(gnc) return gnc end function getGameNetwork() return lGameNetwork end Runtime:addEventListener( "system", setUpGameNetwork )
my build.settings like this:
I did set the googlePlayGamesAppId to the correct id of the google play services
settings = { android = { --123456789012 googlePlayGamesAppId = "123456789012", usesPermissions = { "android.permission.VIBRATE", "android.permission.INTERNET", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.VIBRATE", --flurry "android.permission.ACCESS\_FINE\_LOCATION", --fetches location via GPS "android.permission.ACCESS\_COARSE\_LOCATION", --fetches location via WiFi or cellular service "com.android.vending.BILLING", "android.permission.RECEIVE\_BOOT\_COMPLETED", }, usesFeatures = { -- If you set permissions "ACCESS\_FINE\_LOCATION" and "ACCESS\_COARSE\_LOCATION" above, -- you should set the app to NOT require location services: { name="android.hardware.location", required=false }, { name="android.hardware.location.gps", required=false }, { name="android.hardware.location.network", required=false }, }, }, plugins = { ["CoronaProvider.gameNetwork.google"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["CoronaProvider.ads.vungle"] = { publisherId = "com.vungle", }, ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, --analytics ["CoronaProvider.analytics.flurry"] = { publisherId = "com.coronalabs" }, --inapp purchase ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, --push notification --["plugin.OneSignal"] = --{ -- publisherId = "com.onesignal", --}, --local notification ["plugin.notifications"] = { publisherId = "com.coronalabs" }, ["plugin.coronaAds"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, }, iphone = { plist = { CFBundleDisplayName = "Corecraft", CFBundleName = "Corecraft", CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-40@3x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png" }, UILaunchImages = {}, --required UIApplicationExitsOnSuspend = false, UIPrerenderedIcon = true, UIStatusBarHidden = true, MinimumOSVersion = "6.0", --CoronaLabs NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, NSLocationAlwaysUsageDescription = { "" }, NSLocationWhenInUseUsageDescription = { "" }, }, }, --orientation = --{ default = "portrait", --supported = --{ -- "landscapeLeft", "landscapeRight", "portrait", "portraitUpsideDown", --}, --}, }