Hello. I’m using daily build: “Corona-2019.3473”. I have an app where I followed the tutorial for both GPGS and Apple’s GameCenter. I noticed that the game sign-in / unlock achievement popups are not coming up to the front for Android only. Examples: I log in to GPGS, I don’t see the welcome message. I unlock an achievement, I don’t see the message saying it has been unlocked. I know for sure that the actual achievements are being unlocked - there is a button that you can press to see all of your unlocked achievements. Note that everything works properly on the iOS side (I see popups). The app is live in Google Play if you want to reproduce the issue yourself (all you need to do is select a player, and you immediately unlock an achievement: example: “Play as Holes”). Here is the link: https://play.google.com/store/apps/details?id=com.goinplaces.goinplacescatch&hl=en
Here is something I found related to the underlying java code: https://stackoverflow.com/questions/39851367/google-game-play-service-achievement-does-not-pop-up
Here is some code / settings:
–Note that the key below is purposely masked for this forum:
license =
{
google =
{
key = “xxxxxxxxxxxxxxxxxxxxx”,
policy = “serverManaged”
},
}
plugins =
{
[“plugin.gpgs.v2”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { android=true }
},
[“CoronaProvider.gameNetwork.apple”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { iphone=true, [“iphone-sim”]=true },
},
[“CoronaProvider.native.popup.social”] =
{
publisherId = “com.coronalabs”
},
},
local globalData = require( “globalData” )
local json = require( “json” )
globalData.gpgs = nil
globalData.gameCenter = nil
local platform = system.getInfo( “platform” )
local env = system.getInfo( “environment” )
if ( platform == “android” and env ~= “simulator” ) then
globalData.gpgs = require( “plugin.gpgs.v2” )
elseif ( platform == “ios” and env ~= “simulator” ) then
globalData.gameCenter = require( “gameNetwork” )
end
– Google Play Games Services initialization/login listener
local function gpgsInitListener( event )
if not event.isError then
if ( event.name == “login” ) then – Successful login event
print( json.prettify(event) )
end
end
end
– Apple Game Center initialization/login listener
local function gcInitListener( event )
if event.data then – Successful login event
print( json.prettify(event) )
end
end
– Initialize game network based on platform
if ( globalData.gpgs ) then
– Initialize Google Play Games Services
globalData.gpgs.login( { userInitiated=true, listener=gpgsInitListener } )
elseif ( globalData.gameCenter ) then
– Initialize Apple Game Center
globalData.gameCenter.init( “gamecenter”, gcInitListener )
end
–Note that the below myAchievement has been masked purposely for this forum:
local myAchievement = “xxxxxxxxxxxxxxxxxx”
local globalData = require( “globalData” )
if (globalData.gpgs) then
globalData.gpgs.achievements.unlock({ achievementId = myAchievement, nil })
elseif (globalData.gameCenter) then
globalData.gameCenter.request( “unlockAchievement”,
{
achievement =
{
identifier = myAchievement,
percentComplete = 100,
showsCompletionBanner = true
},
listener = nil
})
end
Can anyone take a look?
Thanks,
Richie