תמיכה ב-Google Play Games Services
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אזהרה: שירות Google Play ללא התקנה לא יהיה זמין יותר. החל מדצמבר 2025 לא תהיה אפשרות לפרסם אפליקציות ללא התקנה דרך Google Play, וכל ממשקי ה-Instant API של Google Play Services יפסיקו לפעול. משתמשים לא יקבלו יותר הצעות ל'אפליקציות ללא התקנה' מ-Play באמצעות אף מנגנון.
אנחנו מבצעים את השינוי הזה על סמך משוב ממפתחים ועל סמך ההשקעות המתמשכות שלנו בסביבה העסקית מאז ההשקה של Google Play ללא התקנה.
כדי להמשיך לבצע אופטימיזציה לצמיחת מספר המשתמשים, אנחנו ממליצים למפתחים להפנות משתמשים לאפליקציה או למשחק הרגילים שלהם, ולהשתמש בקישורי עומק כדי להפנות אותם למסלולים או לתכונות ספציפיים במקרים הרלוונטיים.
כל המשחקים ל'משחק מיידי' חייבים לתמוך בכניסה אוטומטית באמצעות Google Play Games Services. אתם יכולים להשתמש ב-Google Play Games Services כדי לספק מזהה שחקן עקבי שבעזרתו תוכלו לשחזר את ההתקדמות השמורה מהענן.
ההשפעה של גודל הספרייה
ההשפעה של הגודל של ספריית Google Play Games Services תלויה ב-engine של המשחק שפועל ב-Unity, ב-Java או ב-Native.
Java
ההשפעה על הגודל היא מינימלית כי ProGuard מקבל מידע על הכיתות שבהן נעשה שימוש.
Unity
אפשר לשלב את תכונת שמירת המשחק במשחק שלכם ב-Unity באמצעות הפלאגין הרשמי של Google Play Game Services.
ההשפעה על הגודל היא כ-200KB אם משתמשים בהמלצות של ProGuard.
מותאמת
אפשר לשלב את תכונת שמירת המשחק במשחק שנוצר באמצעות Android NDK באמצעות Native Play Games Services SDK.
אפשר להשתמש בהגדרה הכללית של ProGuard שבהמשך כדי להסיר את רוב קוד ה-Java שכלול בספרייה. בעזרת ההגדרה הזו תוכלו להטמיע כניסה ל-Play Games Services ושמירת משחקים, ולהוסיף ל-APK רק כ-250KB.
# The native PGS library wraps the Java PGS SDK using reflection.
-dontobfuscate
-keeppackagenames
# Needed for callbacks.
-keepclasseswithmembernames,includedescriptorclasses class * {
native <methods>;
}
# Needed for helper libraries.
-keep class com.google.example.games.juihelper.** {
public protected *;
}
-keep class com.sample.helper.** {
public protected *;
}
# Needed for GoogleApiClient and auth stuff.
-keep class com.google.android.gms.common.api.** {
public protected *;
}
# Keep all of the "nearby" library, which is needed by the native PGS library
# at runtime (though deprecated).
-keep class com.google.android.gms.nearby.** {
public protected *;
}
# Keep all of the public PGS APIs.
-keep class com.google.android.gms.games.** {
public protected *;
}
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-31 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-08-31 (שעון UTC)."],[],[],null,["**Warning:** Google Play Instant will no longer be available. Starting December 2025,\nInstant Apps cannot be published through Google Play, and all\n[Google Play services Instant APIs](https://developers.google.com/android/reference/com/google/android/gms/instantapps/package-summary)\nwill no longer work. Users will no longer be served Instant Apps by Play using any\nmechanism.\n\nWe're making this change based on developer feedback and our continuous investments\nto improve the ecosystem since the introduction of Google Play Instant.\n\nTo continue optimizing for user growth, we encourage developers to refer users to\ntheir regular app or game, using [deeplinks](https://support.google.com/googleplay/android-developer/answer/12463044)\nto redirect them to specific journeys or features when relevant.\n\nAll Instant play games must support automatic\n[sign-in using Google Play Games Services](https://developers.google.com/games/services/common/concepts/sign-in). Use\nGoogle Play Games Services to\nprovide a consistent player ID that you can use to restore saved progress\nfrom the cloud.\n\nSize impact of the library\n\nThe size impact of the Google Play Games Services library depends on whether the\ngame engine runs on Unity, Java, or Native.\n\nJava\n\nThe size impact is minimal because ProGuard is informed about\nwhich classes are used.\n\nUnity\n\nYou can integrate the game save feature into your Unity game using the\n[official Google Play Game Services plugin](https://github.com/playgameservices/play-games-plugin-for-unity/tree/master/current-build).\nThe size impact is around 200 KB if you use the ProGuard recommendations.\n\nNative\n\nYou can integrate the game save feature with a game built on the Android NDK using the\n[Native Play Games Services SDK](https://developers.google.com/games/services/cpp/GettingStartedNativeClient).\n\nUse the general ProGuard configuration below to strip out most of the Java code\nincluded by the library. You can implement Play Games Services\nsign-in and game save with this configuration, while only adding about\n250 KB to the APK. \n\n # The native PGS library wraps the Java PGS SDK using reflection.\n -dontobfuscate\n -keeppackagenames\n\n # Needed for callbacks.\n -keepclasseswithmembernames,includedescriptorclasses class * {\n native \u003cmethods\u003e;\n }\n\n # Needed for helper libraries.\n -keep class com.google.example.games.juihelper.** {\n public protected *;\n }\n -keep class com.sample.helper.** {\n public protected *;\n }\n\n # Needed for GoogleApiClient and auth stuff.\n -keep class com.google.android.gms.common.api.** {\n public protected *;\n }\n\n # Keep all of the \"nearby\" library, which is needed by the native PGS library\n # at runtime (though deprecated).\n -keep class com.google.android.gms.nearby.** {\n public protected *;\n }\n\n # Keep all of the public PGS APIs.\n -keep class com.google.android.gms.games.** {\n public protected *;\n }"]]