Welcome guest

Mono for Android API Documentation

Analytics, Level sharing, Playtomic.Leaderboards and more for Android games!

Version 0.5

Current as of 11/20/2011. If you see or have any problems let us know!

Setting up the Mono for Android API

Copy the Playtomic folder and everything in it to your game's folder.

Initialize the API and log the view

Before you do anything else you must initialize the API using your credentials from the dashboard. Once you have done that, you can log the view when the player opens your game or resumes it.

To initialize the Playtomic API you need to get a reference to an object of the class Playtomic an save it in a member variable of your Application class. For an explanation of the Application object an its life cicle you can read Android Application class

public class TestApp : Application {

    // we need a reference to the Playtomic API
    //
    private Playtomic playtomic = null;

    public override void OnCreate() {
        base.OnCreate();
        // get a reference to the singleton Playtomic class
        // 
        // Get your credentials from the Playtomic dashboard (add or select game then go to API page)
        //
        playtomic = Playtomic.GetInstance(
                                            /*replace with gameId*/, 
                                            /*replace with gameGuid*/, 
                                            /*replace with apikey*/, 
                                            this);
        Playtomic.Log.View();
    }
}