plugin.gpgs.v2: popups are not displaying for Android (but functionality works)

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

Update on this topic.  I tried using the same code with v1 of the plugin:

[“plugin.gpgs”] =

   {

      publisherId = “com.coronalabs”,

      supportedPlatforms = { android=true }

   },

globalData.gpgs = require( “plugin.gpgs” )

With this change, everything works as expected.  I see the welcome popup banner after logging in.  I also see the achievements unlocked popup banner after unlocking achievements.  It seems the issue is in V2 of the plugin.  I read on another thread that the old plugin is “dependent on the Google Plus login scope.”  With Google Plus shutting down, can I still use V1 of the plugin?

I have the same experience.

After changing from v1 to v2, no toast style popup appears at the top.

Thanks for confirming.

Update on this topic.  I tried using the same code with v1 of the plugin:

[“plugin.gpgs”] =

   {

      publisherId = “com.coronalabs”,

      supportedPlatforms = { android=true }

   },

globalData.gpgs = require( “plugin.gpgs” )

With this change, everything works as expected.  I see the welcome popup banner after logging in.  I also see the achievements unlocked popup banner after unlocking achievements.  It seems the issue is in V2 of the plugin.  I read on another thread that the old plugin is “dependent on the Google Plus login scope.”  With Google Plus shutting down, can I still use V1 of the plugin?

I have the same experience.

After changing from v1 to v2, no toast style popup appears at the top.

Thanks for confirming.