Leaderboards

I created 2 leaderboards named Top Survival and Top Mini-Game  in google play service then

what will happen in when I call

gameNetwork.show( “leaderboards” )? can any one send or show me pics wat will happen??

is there any specific leaderboard to be show?

Im also having hard time working in google service cause during login I wont even worked! :frowning:

'Im using this tutorial

during testing or viewing the achievements or leaderboards do the user or I need to Login First?

gameNetwork.show(“leaderboards”) will show a dialog created by Google Play that lists all of your app’s leaderboards.  The player can then select which leaderboard they want to view to get details on that leaderboard.

If you want to show just a specific leaderboard, you would have to build your own using gameNetwork.request() and the appropriate function to retrieve a list of scores for a given leaderboard and display them however you want.

Thank Robs

also with the gameNetwork.show(“Achievements”)? will show all Achievements list in the google play service i created?
 

To be honest, I don’t remember.  I think it shows all achievements and highlights which ones have been earned.

Thanks again Rob :smiley:

cause even during login im having some errors and i dont know why :frowning:

service missing :frowning:

im using this method

  1. local gameNetwork = require “gameNetwork”
     
  2. local function initCallback( event )
  3.     if not event.isError then
  4.         --loggedIntoGC = true
  5.         native.showAlert( “Success!”, “”, { “OK”} )
  6.         gameNetwork.show( “achievements” )
  7.     else
  8.         native.showAlert( “Failed!”, event.errorMessage, {“OK”})
  9.         print("Error Code: ", event.errorCode)
  10.     end
  11. end
  12.     gameNetwork.init(“google”, initCallback )

then for the build setting

  1. settings =
  2. {
  3. orientation =
  4. {
  5.   default = “landscapeRight”,
  6.   supported = { “portrait” }
  7. },
  8. android =
  9. {
  10.   googlePlayGamesAppId = “868403XXXXX”, – Your Google Play Games App Id
  11. },
  12. plugins =
  13. {
  14.   – key is the name passed to Lua’s ‘require()’
  15.   [“CoronaProvider.gameNetwork.google”] =
  16.   {
  17.    – required
  18.    publisherId = “com.coronalabs”, <-is this the default?? where to get this if not?
  19.   },
  20. },
  21.        
  22.         androidPermissions = {
  23.     “android.permission.INTERNET”,
  24.         },
  25. }

gameNetwork.show(“leaderboards”) will show a dialog created by Google Play that lists all of your app’s leaderboards.  The player can then select which leaderboard they want to view to get details on that leaderboard.

If you want to show just a specific leaderboard, you would have to build your own using gameNetwork.request() and the appropriate function to retrieve a list of scores for a given leaderboard and display them however you want.

Thank Robs

also with the gameNetwork.show(“Achievements”)? will show all Achievements list in the google play service i created?
 

To be honest, I don’t remember.  I think it shows all achievements and highlights which ones have been earned.

Thanks again Rob :smiley:

cause even during login im having some errors and i dont know why :frowning:

service missing :frowning:

im using this method

  1. local gameNetwork = require “gameNetwork”
     
  2. local function initCallback( event )
  3.     if not event.isError then
  4.         --loggedIntoGC = true
  5.         native.showAlert( “Success!”, “”, { “OK”} )
  6.         gameNetwork.show( “achievements” )
  7.     else
  8.         native.showAlert( “Failed!”, event.errorMessage, {“OK”})
  9.         print("Error Code: ", event.errorCode)
  10.     end
  11. end
  12.     gameNetwork.init(“google”, initCallback )

then for the build setting

  1. settings =
  2. {
  3. orientation =
  4. {
  5.   default = “landscapeRight”,
  6.   supported = { “portrait” }
  7. },
  8. android =
  9. {
  10.   googlePlayGamesAppId = “868403XXXXX”, – Your Google Play Games App Id
  11. },
  12. plugins =
  13. {
  14.   – key is the name passed to Lua’s ‘require()’
  15.   [“CoronaProvider.gameNetwork.google”] =
  16.   {
  17.    – required
  18.    publisherId = “com.coronalabs”, <-is this the default?? where to get this if not?
  19.   },
  20. },
  21.        
  22.         androidPermissions = {
  23.     “android.permission.INTERNET”,
  24.         },
  25. }

Yes, gameNetwork.show(“achievements”) does go straight to achievements. On iOS there is navigation within GC that allows the user to go between leaderboards and achievements, but Droid seems to require one call for each which is a bummer - more UI elements on the app end.

Yes, gameNetwork.show(“achievements”) does go straight to achievements. On iOS there is navigation within GC that allows the user to go between leaderboards and achievements, but Droid seems to require one call for each which is a bummer - more UI elements on the app end.