How do I to show GooglePlay Scores in app (.apk)?

  • (Release 200)

    Hello,

    Thats the question:

    ♦ i have a server with a game exported as HTML5

    ♦ i have the same game exported as .apk (cordova -> intel XDK -> Crosskalk). Signed and aligned for Android. And submited.

    In both games there are "GooglePlay" object. I had put this object to show Scores. For example with "GooglePlay.HiScoreMyBest", i can show my best Score ever.

    The game at the server have a diferent configuration at GooglePlay object, compared with the cordova exported for Android. (in GooglePlay Developer Console i have

    2 vinculated aplication, 1 for web and 1 for android.

    ♦ The game exported as HTML has APLICATION ID, CLIENT ID and CLIENT SECRET (taked from web aplication, in GooglePlay developer console)

    ♦The game exported as Cordova has APLICATION ID and CLIENT ID (taked from android aplication), and has the same package name.

    All looks correct. But, with HTML5 website, Gloogle play works well and i can see Scores,

    however it doesn´t work on my mobile phone downloaded from Google Store. Sign in doesnt work too. What is happening? why doesn't work?

    Maybe crosswalk doesnt work. I dont know.

    Any idea?

    Thank you so much, and sorry for my English.

    --------------------------------------------------------------------------------

    Hola,

    Alguien sabe como se hace para que funcione GooglePlay Services en un juego exportado con Cordova->intel XDK ->Crosswalk?

    Pongo el cliente ID y el nombre del paquete, lo firmo y alineo, pero los servicios de google no funcionan, ni siquiera se conecta (Sign In).

    Tengo el mismo juego exportado y configurado para HTML5 (no para android. En cliente ID, etc) en un servidor y funciona todo correctamente.

    Gracias!!

  • In the google developer console, https://console.developers.google.com , on the credentials page under APIs and Auth , did you add the android application ?

    I have to add http://localhost to the redirect uris and my sha1 certificate fingerprint there as well.

  • Yes, i have 2. 1 for web, and 1 for android. For android:

    i have client ID - ♦(chosen by google)

    uris- ♦(chosen by google), ♦ and localhost (anyway, i can not change this)

    name package- ♦es.juegos.ypc

    sha1 ♦(this is correct)

    deep links ♦disabled

    is your game working on Android? I was beginning to think it did not work with android

    any idea?

    tnk u

  • I have several games working on android.

    Does the login window appear when you select to log in ?

  • No, nothing.

    it doesn´t do anything.

    i go to explain what i do. Maybe i do something wrong.

    1. i copy and paste from game services ->vinculated aplications->android, ID aplication and ID client Oauth2. Copy the package name too.

    2. Then i export as Cordova

    3. i open intel XDK ->start a new project-> i choose folder and write a project name.

    4.a dialog appears with options:

    source directory -> (i dont write anything)

    cordova hibrid app project? -> i select YES (im not sure if i do correctly)

    game project? -> i select NO (becose i don´t know that i have to write)

    5. i do clic on the top, left of screen for options.

    On standard plugins(on the left): i select all of them

    On Custom plugins (on the right): GooglePlay Game Services and then i paste the aplication ID (not the OAuth2)

    6. Then on "build settings", i fill the android-crosswalk section (i fill this just in case, becose i sign and align the apk with other method):

    APPID ->es.juegos.ypc

    /name, etc./ version ->1 more than before(ex: 0.0.7),/fullscreen, landscape/version code ->1 more (ex:6)/

    Then i DESELECT signed. Crosswalk version 10.

    7. I fill icons, etc

    8. Then i clic "build" and select crosswalk for android

    9. i download the file and i sign it with "apk signer 1.8.5". Then i align it with same program.

    10. After that, i submit the new version to GooglePlay Developer.

    11. Few minutes/hours after, the new version is ready to download. But GooglePlay services doesn´t work.

    What im doing wrong?

    Thank you so much!

  • lennaert

    can you please tell me how to show the leaderboard on web game ?!

    i signed in correctly but there is no option to show leaderboard !

    when i use: request high score, noting happens

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • i use this:

    on hi-score request success ->add subevent ->System, Repeat -> Count: GooglePlay.HiScoreCount.

    Then u have to create a text object.

    use this action for the repeat event:

    Add action-> Select the text object and then "append text"(not "set text")

    GooglePlay.HiScoreRankAt(loopindex)& "- "&GooglePlay.HiScoreNameAt(loopindex)& " "&GooglePlay.HiScoreFormattedAt(loopindex)&newline

    With this u have a rank.

    ----------------------

    Anybody have an idea about my question?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)