Sử dụng LoyaltyClass.appLinkData để đặt đường liên kết trong ứ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ẻ khách hàng thân thiết nhất định, hãy đặt trường LoyaltyObject.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 loyalty card, including using `LoyaltyClass.LinksModuleData`, `LoyaltyObject.LinksModuleData`, `LoyaltyObject.appLinkData`, and `LoyaltyClass.appLinkData`."],["App linking allows you to direct users to your branded experiences (app or website) from Google Wallet passes, with links appearing at the bottom of the pass."],["The `appLinkData` field can be used to set the URI or Package name of your app or website for a given loyalty card."],["The `displayText` field within `appLinkData` is limited to 30 characters and is used to display a call-to-action on the pass."],["`appLinkData` supports linking to Android apps using package names or Play Store URLs and websites using URIs."]]],["Links can be added to loyalty cards via `LoyaltyClass.LinksModuleData` (for all cards) or `LoyaltyObject.LinksModuleData` (for a specific card). App links, set using `LoyaltyObject.appLinkData` or `LoyaltyClass.appLinkData`, appear at the bottom of the Pass, enabling navigation to branded experiences. `appLinkData` includes fields for Android or web app links, with `displayText` limited to 30 characters. Deep linking requires `webAppLinkInfo` and the target URI.\n"]]