
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
react-native-google-leaderboards-and-achievements
Advanced tools
A React Native module for integrating Google Play Games Services on Android. Supports leaderboard score submissions, achievement unlocking and incrementing, and launching the native UI for leaderboards and achievements. Ideal for cross-platform mobile gam
A React Native module for integrating Google Play Games Services on Android. Supports leaderboard score submissions, achievement unlocking and incrementing, and launching the native UI for leaderboards and achievements. Ideal for cross-platform mobile games requiring native-level game service features. using Google Play Games v2 SDK.
This library handles:
AndroidManifest.xml
, build.gradle
, and Play Games configuration using your app.json
GamesSignInClient
build.gradle
, AndroidManifest.xml
, and Play Games metadataprojectId
from app.json
npm install react-native-google-leaderboards-and-achievements
# or
yarn add react-native-google-leaderboards-and-achievements
{
"expo": {...},
"react-native-google-leaderboards-and-achievements": {
"projectId": "YOUR_GOOGLE_PLAY_GAMES_PROJECT_ID"
}
}
⚠️ Important: Do NOT place this inside the expo block. This library works with bare React Native (even if you use Expo dev tools).
cd android && ./gradlew clean && cd ..
npx react-native run-android
OR
npx expo run-android
OR
eas build ...
✅ Usage
import {login} from 'react-native-google-leaderboards-and-achievements';
const handleLogin = async () => {
try {
const result = await login();
console.log('login result', JSON.stringify(result, null, 2))
const parsed = JSON.parse(result);
} catch (e) {
console.log("Login error", e)
}
};
const handleCheckAuth = async () => {
try {
const result = await checkAuth();
console.log('handleCheckAuth result', JSON.stringify(result, null, 2))
const parsed = JSON.parse(result);
} catch (e) {
console.log("handleCheckAuth error", e)
}
};
import {checkAuth, submitScore} from 'react-native-google-leaderboards-and-achievements';
checkAuth() //Call this before submitting score OPTIONAL
submitScore({
leaderboardId: 'CgkI...yourLeaderboardId', //retrieve from login or checkAuth
score: 1500 //properly format this before submitting
});
//Read https://developer.android.com/games/pgs/leaderboards#score_formatting about formatting. Before you submit formatted scores.
import {showLeaderboard, onShowLeaderboardsRequested} from 'react-native-google-leaderboards-and-achievements';
onShowLeaderboardsRequested() // show all leaderboards list
showLeaderboard('CgkI...yourLeaderboardId'); //particular leaderboard
Show Achievements UI:
import {showAchievements, unlockAchievement, incrementAchievement } from 'react-native-google-leaderboards-and-achievements';
showAchievements()
unlockAchievement('ACHIEVEMENT_ID');
incrementAchievement('ACHIEVEMENT_ID', 2);
📄 API Reference login_v2(): Promise Authenticates the user with Google Play Games. Returns result or error.
submitScore({ leaderboardId, score }) Submits a score to a specific leaderboard.
Read https://developer.android.com/games/pgs/leaderboards#score_formatting about formatting. Before you submit formatted scores.
login(): Promise<string>;
checkAuth(): Promise<string>;
submitScore(leaderboardId: string, score: number): Promise<string>;
onShowLeaderboardsRequested(): Promise<string>;
showLeaderboard(leaderboardId: string): Promise<string>;
//achievements
showAchievements(): Promise<string>;
unlockAchievement(my_achievement_id: string): Promise<string>;
incrementAchievement(my_achievement_id: string, steps: number): Promise<string>;
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
FAQs
A React Native module for integrating Google Play Games Services on Android. Supports leaderboard score submissions, achievement unlocking and incrementing, and launching the native UI for leaderboards and achievements. Ideal for cross-platform mobile gam
We found that react-native-google-leaderboards-and-achievements demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.