Java API Documentation

Setting up the Java API

Download Browse on Github

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

Initialize the API and log the view / session

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 call the initInstance method of Playtomic Class.

    void onGameStart() {
        // init Playtomic API class
        // Get your credentials from the Playtomic dashboard (add or select game then go to API page)
                Playtomic.initInstance(/*replace with gameId*/, 
                                      /*replace with gameGuid*/, 
                                      /*replace with apikey*/, 

SSL (https)

Premium users can use SSL for all API communication by calling this method after initializing the API but before logging the view: