Sử dụng GiftCardClass.appLinkData để đặt đường liên kết ứng dụng ở cuối tất cả các thẻ và vé của lớp đó.
Một lợi ích của tính năng liên kết ứng dụng là giúp lời kêu gọi hành động của bạn đưa người dùng đến với trải nghiệm mang thương hiệu của bạn trên Google Wallet. Các đường liên kết có tính năng này sẽ xuất hiện ở cuối thẻ và vé.
Ví dụ về tính năng
Tổ chức phát hành
Đặt đường liên kết đến ứng dụng trên thẻ và vé trong Google Wallet
Đối với một thẻ quà tặng nhất định, hãy đặt trường GiftCardObject.appLinkData thành URI hoặc Tên gói của ứng dụng hoặc trang web.
Xem định dạng và ngữ cảnh của trường appLinkData trong mã nguồn sau:
Trường displayText có giới hạn 30 ký tự.
[null,null,["Cập nhật lần gần đây nhất: 2025-02-28 UTC."],[[["There are four ways to add links to a gift card: using `GiftCardClass.LinksModuleData` for all cards in a class, `GiftCardObject.LinksModuleData` for a specific card, `GiftCardObject.appLinkData` for an app link at the bottom of a specific pass, and `GiftCardClass.appLinkData` for an app link at the bottom of all passes in a class."],["App linking enables call-to-actions that navigate users to branded experiences from Google Wallet, appearing at the bottom of the pass."],["To set an app link, configure the `GiftCardObject.appLinkData` field with the URI or Package name of your app or website for a given gift card."],["The `appLinkData` field allows specifying `androidAppLinkInfo` for Android and `webAppLinkInfo` for web links, along with `displayText` (limited to 30 characters) for the link's visible label."],["An alternative implementation for `appLinkData` utilizes `targetUri` within `androidAppLinkInfo` to link directly to the app's Play Store listing."]]],["Links can be added to gift cards in four ways: via `GiftCardClass.LinksModuleData` (for all cards in a class), `GiftCardObject.LinksModuleData` (for a specific card), `GiftCardObject.appLinkData`, or `GiftCardClass.appLinkData` (both for app links). `AppLinkData` enables navigation to branded experiences and appears at the pass's bottom. Deep linking requires `webAppLinkInfo`. `appLinkData` includes `androidAppLinkInfo` or `webAppLinkInfo`, and `displayText` (limited to 30 characters).\n"]]