Welcome to the Android Central Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Results 1 to 5 of 5
  1. Thread Author  Thread Author    #1  
    Craphex's Avatar

    Posts
    5 Posts
    Global Posts
    9 Global Posts

    Default How to get leaderboards using html.

    Wanting to make a website that will get data such as leaderboards and achievements.
    Looking into the Rest api https://developers.google.com/games/.../web/api/index but a little confusing and not sure how to plug it into the webpage. Any ideas?
  2. #2  

    Default Re: How to get leaderboards using html.

    There's two ways of doing this on Android. The first and easiest way is to use the google play game services. Google will basically do all of the heavy lifting for you this way and there's a really great tutorial linked in the developer console in the play game services section. The only downside is that since google are running it, you'll have less control over how it's presented.

    The other way is to set everything up yourself. For this you'll need your own website with server space and a backend database. In simplest terms you first set up the database with the fields and tables you want. Next you need to write some scripts (PHP or whatever server-side script you prefer) that accept a POST request that updates the database and responds with the updated database table. Finally, in Android you create a HTTPClient object that sends a POST request to the URL of your scripts and a HTTPResponse object to catch the response.

    Personally I'd prefer the Google approach, but if you're just learning about web technologies the second option is a great starting point for understanding web interactions.
  3. #3  

    Default Re: How to get leaderboards using html.

    Google Play Game Service SDK is having everything you need, i guess.

    But i think Facebook offers something similar.
  4. #4  

    Default Re: How to get leaderboards using html.

    setting up yourself is way too much work, it's not just about HTTP POST requests, but you also must setup authentication tokens so that people can't just send requests from anywhere. Google Play Services uses OAuth 2.0 for this, and it makes sure everything is good to go, you should use it. it's the easiest way
  5. #5  
    KM-Games's Avatar

    Posts
    12 Posts
    Global Posts
    25 Global Posts

    Default Re: How to get leaderboards using html.

    I recommend you to google for "App42 Cloud Api" (i can not post links yet :/) I use it together with Unity, it`s really simple to setup, free for indie-studios (up to 1million api-calls) and the best is you can use it also for iOS and WP8 and PC Games.

Similar Threads

  1. s4mini talk to text stops working
    By AC Question in forum Ask a Question
    Replies: 1
    Last Post: 09-08-2014, 01:43 AM
  2. Nexus 7 seems to be stuck on x
    By AC Question in forum Ask a Question
    Replies: 1
    Last Post: 08-01-2014, 01:15 PM
  3. [How To] {Help Me}
    By Kenn Mondina in forum Ask a Question
    Replies: 3
    Last Post: 08-01-2014, 10:37 AM
  4. Saving to SD card
    By Unregistered in forum Ask a Question
    Replies: 1
    Last Post: 08-01-2014, 08:55 AM
  5. Replies: 0
    Last Post: 08-01-2014, 08:45 AM

Posting Permissions