
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
construct-play-games
Advanced tools
This plugin uses the latest API methods as of the 12/02/2018.
This is intended to be used with the Construct 3 runtime, but should work with any cordova project.
All methods can be found as part of cordova.plugins.ConstructPlayGames.
Installation
cordova plugin add construct-play-games --variable APP_ID=[ game identifier ]
setCallback(Function callback)Register a callback method for updates to the login state
const play = cordova.plugins.ConstructPlayGames;
play.setCallback((err, isLoggedIn) => {
if (!err)
console.log(isLoggedIn ? "Logged in" : "Logged out");
});
silentSignIn()Login without prompting the user ( they must have previously signed in ).
play.silentSignIn();
signin()Attempt a normal login, this will display a dialog ( briefly ) even if the user has already logged in.
play.signin();
signout()Logout of the current account.
play.signout();
showLeaderboards(optional Function callback)Show the native leaderboard dialog with all leaderboards
play.showLeaderboards()
// OR
play.showLeaderboards(err => {
if(!err)
console.log("Did show leaderboards");
});
showLeaderboard(Object parameters, optional Function callback)Show the native leaderboard dialog with a specific leaderboard
const params = {
leaderboardId: "my_leaderboard_id"
};
play.showLeaderboard(params)
// OR
play.showLeaderboards(params, err => {
if(!err)
console.log("Did show leaderboards");
});
showAchievements(optional Function callback)Show the native achievement dialog with all achievements
play.showAchievements()
// OR
play.showAchievements(err => {
if(!err)
console.log("Did show achievements");
});
getHiScores(Object parameters, Function callback)Get the high scores for the selected leaderboard as a JS object. Use the optional reload option to bypass the local cache.
const params = {
leaderboardId: "my_leaderboard_id",
reload: true
};
play.getHiScores(params, (err, obj) => {
if(!err)
console.log("high scores", obj);
/*
* obj = {
* "items": [
* {
* "player": {
* "displayName": String,
* "iconURI": String
* },
* "scoreValue": Int,
* "formattedScore": String,
* "scoreTag": String,
* "scoreRank": Int,
* "formattedScoreRank": String
* }
* ],
* "playerScore": null
* }
*/
});
submitScore(Object parameters, optional Function callback)Submit a highscore to the selected leaderboard.
const params = {
leaderboardId: "my_leaderboard_id",
score: 42
};
play.submitScore(params);
// OR
play.submitScore(params, err => {
if(!err)
console.log("successfully submitted score");
});
getAchievements(optional Object parameters, Function callback)Get the achievements for the app as a JS object. Use the optional reload option to bypass the local cache.
const params = {
reload: true
};
play.getAchievements(params, (err, obj) => {
if(!err)
console.log("achievements", obj);
/*
* obj = {
* "items": [
* {
* "id": String,
* "state": "Int"
* "name": String,
* "description": String,
* "type": Int,
* "currentSteps": Int,
* "totalSteps": Int,
* "revealedUrl": String,
* "unlockedUrl": String
* }
* ]
* }
*/
});
incrementAchievement(Object parameters, optional Function callback)Increment the selected achievement by the given number of steps.
const params = {
achievementId: "my_achievement_id",
numSteps: 42
};
play.incrementAchievement(params);
// OR
play.incrementAchievement(params, err => {
if(!err)
console.log("successfully incremented achievement");
});
setStepsAchievement(Object parameters, optional Function callback)Set the current step value of the selected achievement.
const params = {
achievementId: "my_achievement_id",
numSteps: 42
};
play.setStepsAchievement(params);
// OR
play.setStepsAchievement(params, err => {
if(!err)
console.log("successfully set achievement steps");
});
revealAchievement(Object parameters, optional Function callback)Reveal the selected achievement.
const params = {
achievementId: "my_achievement_id"
};
play.revealAchievement(params);
// OR
play.revealAchievement(params, err => {
if(!err)
console.log("successfully revealed achievement");
});
unlockAchievement(Object parameters, optional Function callback)Unlock the selected achievement.
const params = {
achievementId: "my_achievement_id"
};
play.unlockAchievement(params);
// OR
play.unlockAchievement(params, err => {
if(!err)
console.log("successfully unlocked achievement");
});
FAQs
Cordova plugin for google play games in the construct game runtime
We found that construct-play-games demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.