Links zur generischen Karte bzw. zum generischen Ticket hinzufügen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Es gibt vier Möglichkeiten, einem generischen Ausweis Links hinzuzufügen.
Verwenden Sie GenericClass.LinksModuleData, um Links zu allen generischen Karten/Tickets hinzuzufügen, die mit der GenericClass verknüpft sind.
Verwende GenericObject.LinksModuleData, um einen Link zu einer bestimmten generischen Karte/TicketGenericObject hinzuzufügen.
Verwende GenericObject.appLinkData, um einen App-Link unten auf der Karte bzw. dem Ticket zu platzieren.
Verwenden Sie GenericClass.appLinkData, um einen App-Link unten in allen Karten/Tickets dieser Kursklasse zu platzieren.
Ein Vorteil der App-Verknüpfung besteht darin, dass dein Call-to-Action-Kanal Nutzer über Google Wallet zu deinen Markeninhalten leiten kann. Links mit dieser Funktion werden unten auf der Karte bzw. dem Ticket angezeigt.
Beispiel für eine Funktion
Aussteller
App-Link in Google Wallet-Karte/-Ticket einrichten
Legen Sie für eine bestimmte generische Karte/ein bestimmtes generisches Ticket das Feld GenericObject.appLinkData auf den URI oder Paketnamen Ihrer App oder Website fest.
Im folgenden Quellcode findest du das Format und den Kontext des Felds appLinkData:
Das Feld displayText ist auf 30 Zeichen begrenzt.
[null,null,["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eThere are four ways to add links to Generic passes: using \u003ccode\u003eGenericClass.LinksModuleData\u003c/code\u003e for all passes of a class, using \u003ccode\u003eGenericObject.LinksModuleData\u003c/code\u003e for a specific pass, using \u003ccode\u003eGenericObject.appLinkData\u003c/code\u003e for an app link at the bottom of a specific pass, and using \u003ccode\u003eGenericClass.appLinkData\u003c/code\u003e for an app link at the bottom of all passes of a class.\u003c/p\u003e\n"],["\u003cp\u003eApp linking allows call-to-actions on Google Wallet passes to direct users to branded experiences, with links appearing at the bottom of the pass.\u003c/p\u003e\n"],["\u003cp\u003eTo set an app link, configure the \u003ccode\u003eGenericObject.appLinkData\u003c/code\u003e field with the URI or package name of your app or website for a specific pass or \u003ccode\u003eGenericClass.appLinkData\u003c/code\u003e for all passes of that class.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eappLinkData\u003c/code\u003e field can include \u003ccode\u003eandroidAppLinkInfo\u003c/code\u003e for Android apps and \u003ccode\u003ewebAppLinkInfo\u003c/code\u003e for websites, and the \u003ccode\u003edisplayText\u003c/code\u003e field, limited to 30 characters, provides a label for the link.\u003c/p\u003e\n"],["\u003cp\u003eYou can alternatively use \u003ccode\u003etargetUri\u003c/code\u003e within \u003ccode\u003eandroidAppLinkInfo\u003c/code\u003e to link directly to your app's Play Store listing instead of opening the app directly.\u003c/p\u003e\n"]]],["Links can be added to Generic passes via `GenericClass.LinksModuleData` (for all class passes) or `GenericObject.LinksModuleData` (for specific passes). App links, displayed at the pass's bottom, are added using `GenericObject.appLinkData` (specific pass) or `GenericClass.appLinkData` (all class passes). `appLinkData` uses either `androidAppLinkInfo` with a package name or `webAppLinkInfo` for deep linking. `displayText` field is limited to 30 characters.\n"],null,["# Add links to your Generic Pass\n\nThere are four ways to add links to a Generic pass.\n\n- Use `GenericClass.LinksModuleData` to add links to all Generic passes that are associated with the `GenericClass`.\n- Use `GenericObject.LinksModuleData` to add a link to a specific Generic pass `GenericObject`.\n- Use [GenericObject.appLinkData](/wallet/generic/rest/v1/AppLinkData) to place an app link at the bottom of that particular Pass.\n- Use [GenericClass.appLinkData](/wallet/generic/rest/v1/AppLinkData) to place an app link at the bottom of all the passes of that class.\n\n\nOne benefit of *app linking* is that it empowers your call-to-action to navigate\nusers to your branded experiences from Google Wallet. Links with this feature appear at the bottom\nof the Pass.\n\n### Feature example\n\n|--------|\n| |\n| Issuer |\n\n### Set the app link on your Google Wallet pass\n\nFor a given Generic pass, set the field `GenericObject.appLinkData`\nto the URI or Package name of your app or website.\n\n\nSee the format and context of the `appLinkData` field in the following source code:\nThe `displayText` field is limited to 30 characters.\n**Note:** To deep link to a specific view within an app you must use webAppLinkInfo. \n\n```\n {\n \"id\": string,\n \"classId\": string,\n …\n …\n …\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appTarget\": {\n \"packageName\": \"com.google.android.gm\",\n }\n },\n \"webAppLinkInfo\": {\n \"appTarget\": {\n \"targetUri\": {\n \"uri\": \"https://mail.google.com/mail/\",\n \"description\": \"Web link for Gmail\"\n }\n }\n }\n \"displayText\": {\n \"defaultValue\": {\n \"value\": \"Our awesome app!\"\n }\n }\n }\n }\n```\nFor posterity the following implementation will also work. \n\n```\n{\n \"id\": string,\n \"classId\": string,\n …\n …\n …\n \"appLinkData\": {\n \"androidAppLinkInfo\": {\n \"appTarget\": {\n \"targetUri\": {\n \"uri\": \"https://play.google.com/store/apps/details?id=com.google.android.gm\",\n \"description\": \"Play store link for Gmail app\"\n }\n }\n }\n }\n}\n```"]]