Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Les services de jeux Play peuvent ajouter automatiquement des raccourcis d'application, par exemple pour permettre aux utilisateurs de choisir rapidement le profil des services de jeux Play à utiliser.
Les raccourcis d'application peuvent être ajoutés ou supprimés en fonction du nombre de comptes sur l'appareil et de l'utilisation du jeu.
Raccourcis disponibles
Sélecteur de profil: raccourci permettant aux joueurs de basculer entre différents profils Play Jeux. Consultez Changer de profil Play Jeux pour accéder à l'article correspondant du centre d'aide.
Gérer les raccourcis d'application renseignés par les services Play Jeux
Si votre jeu utilise activement les raccourcis d'application, vous pouvez limiter le nombre de raccourcis d'application renseignés par les services Play Jeux. Pour ce faire, ajoutez un élément métadonnées à toute déclaration d'activité "android.intent.category.LAUNCHER", en définissant les éléments suivants:
De android:name à "com.google.android.gms.games.APP_SHORTCUTS_MAX_NUMBER"
android:value au nombre maximal d'emplacements de raccourcis d'application pouvant être utilisés par les services de jeux Play.
Exemple
Dans cet exemple, nous vous expliquons comment limiter le nombre maximal d'emplacements de raccourcis d'application que les services Play Jeux peuvent utiliser à deux. Pour notre exemple, nous aurions initialement un fichier manifeste d'application qui se présente comme suit:
Et voilà ! Le nombre maximal d'emplacements de raccourcis d'application que les services Play Jeux peuvent utiliser est désormais limité à deux.
Le contenu et les exemples de code de cette page sont soumis aux licences décrites dans la Licence de contenu. Java et OpenJDK sont des marques ou des marques déposées d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/26 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/26 (UTC)."],[],[],null,["# App shortcuts\n\nThe Play Games services may automatically add [app shortcuts](https://developer.android.com/develop/ui/views/launch/shortcuts), for\nexample to allow users to quickly choose the Play Games Services profile to use.\nThe app shortcuts could be added or removed based on the number of the accounts\non the device and the game usage.\n\nAvailable shortcuts\n-------------------\n\n**Profile switcher** : shortcut for players to switch between different Play\nGames Profiles. See [How to switch Play Games profiles](https://support.google.com/googleplay/answer/14754238), for\ncorresponding Help Center article.\n\nManage the Play Games services populated app shortcuts\n------------------------------------------------------\n\nIn case your game actively uses the app shortcuts, you could limit the number of\napp shortcuts populated by the Play Games services. For that add a\n[meta-data](https://developer.android.com/guide/topics/manifest/meta-data-element)\nelement to any `\"android.intent.category.LAUNCHER\"` activity declaration,\nsetting the following:\n\n- `android:name` to `\"com.google.android.gms.games.APP_SHORTCUTS_MAX_NUMBER\"`\n- `android:value` to the maximum number of the app shortcuts slots that can be used by the Play Games services.\n\n### Example\n\nIn this example, we show how to limit the maximum number of the app shortcuts\nslots that the Play Games services can use to **two** . For our example, we\ninitially would have an\n[app manifest](https://developer.android.com/guide/topics/manifest/manifest-intro)\nthat looks like the following: \n\n \u003cmanifest ... \u003e\n \u003capplication ... \u003e\n \u003cactivity android:name=\".ExampleActivity\" \u003e\n \u003cintent-filter\u003e\n \u003caction android:name=\"android.intent.action.MAIN\" /\u003e\n \u003ccategory android:name=\"android.intent.category.LAUNCHER\" /\u003e\n \u003c/intent-filter\u003e\n \u003c/activity \u003e\n ...\n \u003c/application \u003e\n ...\n \u003c/manifest \u003e\n\nAnd to apply the limits the app manifest should be updated to the following: \n\n \u003cmanifest ... \u003e\n \u003capplication ... \u003e\n \u003cactivity android:name=\".ExampleActivity\" \u003e\n \u003cintent-filter\u003e\n \u003caction android:name=\"android.intent.action.MAIN\" /\u003e\n \u003ccategory android:name=\"android.intent.category.LAUNCHER\" /\u003e\n \u003c/intent-filter\u003e\n \u003cmeta-data\n android:name=\"com.google.android.gms.games.APP_SHORTCUTS_MAX_NUMBER\"\n android:value=\"2\" /\u003e\n \u003c/activity \u003e\n ...\n \u003c/application \u003e\n ...\n \u003c/manifest \u003e\n\nThat's it. Now the maximum number of the app shortcuts slots that the Play Games\nservices can use is limited to **two**."]]