[Resolved] Google Play Game Services & Landscape Game issues using Daily Build 1148 on Mac

I’m looking into implementing Google Play Game Services leaderboards and achievements using daily build 1148, and the first thing I did was to add lines in build.settings, but immediately the simulator is giving me issues:

  1.  As per the documentation ( http://docs.coronalabs.com/daily/plugin/gameNetwork-google/ ) I added the following to my build.settings:

[lua]

settings =

{

    android =

    {

        googlePlayGamesAppId = “xxxxxxxxxxx” – I added my Google Play Games App Id here

    },

    plugins =

    {

        – key is the name passed to Lua’s ‘require()’

        [“CoronaProvider.gameNetwork.google”] =

        {

            – required

            publisherId = “com.coronalabs”,

        },

    },

}

[/lua]

As soon as I added the above to my build.settings, my landscape game shows up in portrait on simulator (Mac). 

  1.  If I comment out the googlePlayGamesAppId line, the orientation returns to normal (i.e., it appears in landscape as it should), but then I get popup alert that says:

This project requires certain plugins to run properly.

Do you wish to download these plugins for the simulator?

If I click on Download button, it gives me an error message:

Error: A plugin could not be downloaded.

If you are sure you are requiring the correct plugin please contact support.

com.coronalabs/CoronaProvider.gameNetwork.google

Is this an issue with the daily build 1148, or is it a bug that’s been around?  Or… is there something else I need to add that would clear this up?  Without this issue fixed, I don’t think I can proceed with implementing Google Play Game Services…

BTW, will there be a sample file for implementing Google Play Game Services leaderboards and achievements?  I looked for it in CoronaSDK/SampleCode/GameNetwork folder, but I did not find it there.

Naomi

Hi,

  1. I believe you have a build.settings file that is formatted incorrectly which would cause the game to show up as portrait in the simulator.  Can you post your build.settings file?

  2. This issue might be associated with #1.  I do not see this issue on my end.

  3. You are right, we don’t have any samples in the SampleCode folder.  You can find the sample code here though: https://github.com/coronalabs/plugins-sample-gameNetwork-google

Hi Naomi,

I added landscape-only parameters to the Google Play Services sample and it show up fine in landscape mode in the Mac simulator. As Danny mentioned above, please check your build.settings file.

Tom

@dchan and @Tom, thank you for your reply posts.  I looked at my build.settings and noticed that comma was missing at the end of the googlePlayGamesAppId line.  Adding the comma fixed the orientation issue.  And, actually, this missing comma error originated from sample build.settings code in the documentation ( http://docs.coronalabs.com/daily/plugin/gameNetwork-google/ )  Copying and pasting the code from the documentation resulted in the incorrect formatting.  It would be good to fix the documentation so that other devs wouldn’t encounter the very same problem.

Regarding the plugin-could-not-be-downloaded error message, I still get them.  The terminal window shows the following while simulator is showing spinning activity indicator:

2013-06-21 20:32:36.138 Corona Simulator[367:e03] PluginSync: downloading: http://plugins.coronasphere.com/com.coronalabs/CoronaProvider.gameNetwork.google/manifest.json

I thought, perhaps, I needed to restart my Mac before whatever is causing the error message to go away, but it did not fix the problem.  So I’m still stuck.

I’ll download the sample code from github and see if there’s something else I might need to do.  Meanwhile, if you have any ideas why this error message pops up, please let me know.

Thanks again.

Naomi

Ah, the comma is missing in the build.settings file in github too…  Or maybe it doesn’t need a comma if there’s nothing else in android table?  But most likely, we will all have other items under android and it’s probably best if the comma is added there.  No?

Naomi

P.S.  I still don’t see how I may get rid of the plugin-could-not-be-downloaded error message…

You’re correct in that it doesn’t need a comma if theres nothing else in the android table and you’re also correct in that its better to add in a comma in the samples/docs anyways.  

Can you post your build.settings so we can look into to see if theres anything funny in there?  Also what very of the simulator are you using? Thanks.

@dchan, here’s my build.settings (with iphone table removed).  I appreciate you taking a look:

[lua]

settings = {

    

    orientation = {

        default = “landscapeRight”,

        supported =

        {

            “landscapeRight”, “landscapeLeft”, 

        },

    },

    

    android =

    {

        googlePlayGamesAppId = “xxxxxxxxxx”, – Google Play Games App Id

        

        permissions =

        {

            { name = “.permission.C2D_MESSAGE”, protectionLevel = “signature” },

        },

        

        usesPermissions =

        {

            “com.android.vending.BILLING”,

            “android.permission.GET_ACCOUNTS”,

            “android.permission.RECEIVE_BOOT_COMPLETED”,

            “com.google.android.c2dm.permission.RECEIVE”,

            “.permission.C2D_MESSAGE”,

            “android.permission.READ_PHONE_STATE”, 

            “android.permission.INTERNET”,

            “android.permission.ACCESS_WIFI_STATE”,

            “android.permission.ACCESS_NETWORK_STATE”,

        },

    },

    plugins =

    {

        – key is the name passed to Lua’s ‘require()’

        [“CoronaProvider.gameNetwork.google”] =

        {

            – required

            publisherId = “com.coronalabs”,

        },

        – key is the name passed to Lua’s ‘require()’

        [“CoronaProvider.ads.admob”] =

        {

            – required

            publisherId = “com.coronalabs”,

        },

    },

}

[/lua]

And the simulator is Version 2013.1148 (2013.6.21) on Mac.

Naomi

Hi,

This is a problem with the simulator.  If you go back to 1144 it should work.

Got it.  Thank you.  I’ll fetch 1144.

Naomi

A quick note to let you know that 1149 also throws out the same error but without the spinning activity indicator.  No issues with 1144.  Hopefully this will be fixed in the upcoming daily build soon.

Naomi

Thanks for reporting this problem Naomi. The problem has been corrected in build 1150.

That sounds great, @albert90.  Thank you for letting me know.

Naomi

Hi,

  1. I believe you have a build.settings file that is formatted incorrectly which would cause the game to show up as portrait in the simulator.  Can you post your build.settings file?

  2. This issue might be associated with #1.  I do not see this issue on my end.

  3. You are right, we don’t have any samples in the SampleCode folder.  You can find the sample code here though: https://github.com/coronalabs/plugins-sample-gameNetwork-google

Hi Naomi,

I added landscape-only parameters to the Google Play Services sample and it show up fine in landscape mode in the Mac simulator. As Danny mentioned above, please check your build.settings file.

Tom

@dchan and @Tom, thank you for your reply posts.  I looked at my build.settings and noticed that comma was missing at the end of the googlePlayGamesAppId line.  Adding the comma fixed the orientation issue.  And, actually, this missing comma error originated from sample build.settings code in the documentation ( http://docs.coronalabs.com/daily/plugin/gameNetwork-google/ )  Copying and pasting the code from the documentation resulted in the incorrect formatting.  It would be good to fix the documentation so that other devs wouldn’t encounter the very same problem.

Regarding the plugin-could-not-be-downloaded error message, I still get them.  The terminal window shows the following while simulator is showing spinning activity indicator:

2013-06-21 20:32:36.138 Corona Simulator[367:e03] PluginSync: downloading: http://plugins.coronasphere.com/com.coronalabs/CoronaProvider.gameNetwork.google/manifest.json

I thought, perhaps, I needed to restart my Mac before whatever is causing the error message to go away, but it did not fix the problem.  So I’m still stuck.

I’ll download the sample code from github and see if there’s something else I might need to do.  Meanwhile, if you have any ideas why this error message pops up, please let me know.

Thanks again.

Naomi

Ah, the comma is missing in the build.settings file in github too…  Or maybe it doesn’t need a comma if there’s nothing else in android table?  But most likely, we will all have other items under android and it’s probably best if the comma is added there.  No?

Naomi

P.S.  I still don’t see how I may get rid of the plugin-could-not-be-downloaded error message…

You’re correct in that it doesn’t need a comma if theres nothing else in the android table and you’re also correct in that its better to add in a comma in the samples/docs anyways.  

Can you post your build.settings so we can look into to see if theres anything funny in there?  Also what very of the simulator are you using? Thanks.

@dchan, here’s my build.settings (with iphone table removed).  I appreciate you taking a look:

[lua]

settings = {

    

    orientation = {

        default = “landscapeRight”,

        supported =

        {

            “landscapeRight”, “landscapeLeft”, 

        },

    },

    

    android =

    {

        googlePlayGamesAppId = “xxxxxxxxxx”, – Google Play Games App Id

        

        permissions =

        {

            { name = “.permission.C2D_MESSAGE”, protectionLevel = “signature” },

        },

        

        usesPermissions =

        {

            “com.android.vending.BILLING”,

            “android.permission.GET_ACCOUNTS”,

            “android.permission.RECEIVE_BOOT_COMPLETED”,

            “com.google.android.c2dm.permission.RECEIVE”,

            “.permission.C2D_MESSAGE”,

            “android.permission.READ_PHONE_STATE”, 

            “android.permission.INTERNET”,

            “android.permission.ACCESS_WIFI_STATE”,

            “android.permission.ACCESS_NETWORK_STATE”,

        },

    },

    plugins =

    {

        – key is the name passed to Lua’s ‘require()’

        [“CoronaProvider.gameNetwork.google”] =

        {

            – required

            publisherId = “com.coronalabs”,

        },

        – key is the name passed to Lua’s ‘require()’

        [“CoronaProvider.ads.admob”] =

        {

            – required

            publisherId = “com.coronalabs”,

        },

    },

}

[/lua]

And the simulator is Version 2013.1148 (2013.6.21) on Mac.

Naomi