Skip to content

Cordova plugin for Google Play Games Leaderboard service for android

License

Notifications You must be signed in to change notification settings

princesanjivy/cordova-plugin-leaderboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova Leaderboard Plugin

Overview

Cordova plugin for Google Play Games Leaderboard service for android.

You need to set up your game in Google Play Developer console. Also have a look at https://developers.google.com/games/services/android/quickstart

Installation

cordova plugin add cordova-plugin-leaderboard --variable APP_ID=YOUR_APP_ID

or

cordova plugin add https://github.com/princesanjivy/cordova-plugin-leaderboard.git --variable APP_ID=YOUR_APP_ID

Usage

Place this inside of your deviceready function.

Sign in

leaderboard.init(
  function(){
    // on sign in success;
  },
  function(){
    // on failure ;
  }
);

Submit Score

leaderboard.setScore(
  leaderboard_id, // Leaderboard id
  score, // score to be submitted to that leaderboard
  function(){}, //successCallback
  function(){} // errorCallback
);

Show Leaderboard

leaderboard.showLeaderboard(
  leaderboard_id, // Leaderboard id
  function(){}, // successCallback
  function(){} // errorCallback
);

Construct 2 Plugin

Construct2 Play Games Leaderboard

More Info

https://cordova.apache.org/plugins/

License

MIT license

About

Cordova plugin for Google Play Games Leaderboard service for android

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published