Google Play Services Module for Godot 2.0++

1000parsecs1000parsecs Posts: 8Member
edited September 2016 in Resources
UPDATED: 11 July 2016
- more readable instructions

GitHub repo:

Note that this is for the actual Google Play Services, not AdMob. Has achievements and leaderboards.

Originally forked from Blubee's and refactored / changed. Also added leaderboards. Might add more features when I have a lot of time to relax.

Tags :


  • anyoneianyonei Posts: 7Member
    i was trying to use this module<br />it looks like user signs in correctly without any problems<br />but when i try to show a leaderboard or achievements simply nothing happens<br />any idea how to solve this<br />Tx.
  • 1000parsecs1000parsecs Posts: 8Member
    [color=rgb(51, 51, 51)]Hmm, make sure you have at least one leaderboard and one achievement created in your Developer's Console. You followed all the instructions on the GitHub page, right? [/color]<br /><br /><br />Also, you must sign in first before leaderboards and achievements can be shown.
  • anyoneianyonei Posts: 7Member
    yep , did everything as said in github page<br />and in developer console did everything even its in publish state<br /><br />i init like this<br />
    func _init():<br />	print(get_instance_ID())<br />	if Globals.has_singleton(&quot;PlayGameServices&quot;):<br />		<br />		PlayGameServices = Globals.get_singleton(&quot;PlayGameServices&quot;)<br />		PlayGameServices.init(get_instance_ID())<br />		PlayGameServices.sign_in()
    <br />and try to show achievements like this <br />
    func showach():<br />	if PlayGameServices:<br />		PlayGameServices.achievement_show_list()
    <br />maybe im missing smt?<br />
  • 1000parsecs1000parsecs Posts: 8Member
    Try to sign_in() in _ready() instead, or put it on a button.<br /><br /><br />and <br /><br /><br />
    <br />func showach():&nbsp;  <br />&nbsp; &nbsp; if PlayGameServices:&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; PlayGameServices.achievement_show_list()<br />
    <br /><br /><br />should be:<br /><br /><br />
    <br /><br />func showach():&nbsp; <br />&nbsp;  if Globals.has_singleton(&quot;PlayGameServices&quot;):<br />&nbsp; &nbsp; &nbsp; &nbsp; PlayGameServices.achievement_show_list()<br /><br /><br />
    <br /><br /><br />assuming PlayGameSerivces has been declared somewhere:<br /><br />
    <br />var PlayGameServices<br />
    <br /><br />and like in your _init(), already let it get_singleton("PlayGameServices")<br /><br /><br />Posting something formatted in this forum is such a ****ing pain.
  • anyoneianyonei Posts: 7Member
    lol :) <br />tx for replys but nothing works <br />i ll try to reset everything and start again<br />ill post if i find anything :)
  • 1000parsecs1000parsecs Posts: 8Member
    Can you post your logcat of when you try to open the achievements list?
  • anyoneianyonei Posts: 7Member
    i found the problem dude  :)<br />somehow Google Drive API was disabled when i reenabled it. It worked<br />
  • 1000parsecs1000parsecs Posts: 8Member
    Haha. I wrote about that in the last 3 paragraphs of the Great to know it's working. However, if you update your Android SDK to the latest, you might get java.lang.RuntimeException: Unable to get provider due to the API being changed to use Firebase for some stuff.
  • ArnavArnav Posts: 3Member
    edited June 2017

    Hi! I also have this problem. I have done everything in the README and done enabled the Drive API. in the log it says something about not specifying the view for the popup? I am just trying to get achievments to unlock and show the list but nothing happens. Please help me! Thanks

    SOLVED - I didnt have my code setup correctly

  • PupolajshuPupolajshu Posts: 9Member

    Hi, I am not sure if you will read this, but I it seems that sign_in() function fails... I mean, I cannot log in, it shows the signing in pop-up but then it disappears.
    Yes, I have enabled apks, compiled and stuff... I did everything you did

  • ArnavArnav Posts: 3Member

    Hi, the module definitely works! If you can't log in, it maybe because your internet connection is not turned on? If not, can you describe the problem in more detail?


  • PupolajshuPupolajshu Posts: 9Member

    @Arnav said:

    Did you get it working?

    I couldn't, because the signin in window disappears a few seconds after showing up.

  • Shin-NiLShin-NiL Posts: 154Moderator

    Use logcat to track the error, if something get wrong you'll likely find some useful info there.

  • coderpycoderpy Posts: 6Member

    This module is depreciated.

    This module is partially functional.
    Only the part of the leaderboard that is still in trouble.

Sign In or Register to comment.