views:

135

answers:

2

Hi there

I want my android game users to be able to submit their highscores to an online leaderboard and then be able to view this leaderboard in game, say when they get Game Over for instance. This isn't a new idea of course but I just wondered if anyone knew of the way I should implement this, and whether android provides any API's that would be advisable.

I've never attempted to integrate a web based component into a program like this before.

Many thanks

+1  A: 

Android doesn't provide anything out of the box, but there are a few third parties that have libraries available. I haven't actually used one myself, but examples: aHighScore, mob1serv.

Mayra
+1  A: 

Create a web service that fronts a database and provide a REST interface to it. The application can then consume the web service.

A promising project is RESTProvider which parses REST responses into an Android Provider.

Also, you could check out Restlet.

Android has a JSON parser in the org.json namespace.

See, Android accessing RESTFull JSON Services Library for an example on how to use the GSON libary to hydrate and dehydrate JSON as Java objects.

Timothy Lee Russell
many thanks for the suggestion. i will look into this.
Greenhouse Gases