通知
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
通用卡券支持两种类型的通知,您可以配置以下任一类型:
- 即将发送的通知
- 到期通知
即将发送的通知
近期通知会在时间间隔开始前 24 小时向用户显示。
配置即将显示的通知后,系统会向用户显示标题为“genericObject.cardTitle
现已可用”和副标题“查看卡券”的通知。
如需配置即将发送的通知,请将布尔值 UpcomingNotification.enabledNotification 设置为 true
。
到期通知
到期通知会在时间间隔结束前 48 小时显示。
配置通知后,系统将向用户显示标题为“genericObject.cardTitle
[x] 天后过期”且副标题为“查看卡券”的通知。
如需配置近期通知,请将布尔值 ExpiryNotification.enabledNotification 设置为 true
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eGeneric passes offer two notification types: upcoming and expiry, allowing users to receive timely alerts.\u003c/p\u003e\n"],["\u003cp\u003eUpcoming notifications, triggered 24 hours before a specified time interval, inform users that their generic object is available.\u003c/p\u003e\n"],["\u003cp\u003eExpiry notifications, appearing 48 hours prior to the end of a time interval, remind users of the impending expiration of their generic object.\u003c/p\u003e\n"],["\u003cp\u003eBoth notification types can be easily enabled by setting the respective boolean value (\u003ccode\u003eenabledNotification\u003c/code\u003e) to \u003ccode\u003etrue\u003c/code\u003e in the pass configuration.\u003c/p\u003e\n"]]],["Generic Passes offer upcoming and expiry notifications. Upcoming notifications, appearing 24 hours before the start time, display the pass's card title and \"View pass\" as the subtitle, enabled by setting `UpcomingNotification.enabledNotification` to `true`. Expiry notifications, appearing 48 hours before the end time, show the card title and an \"expires in [x] days\" message with a \"View pass\" subtitle, enabled by setting `ExpiryNotification.enabledNotification` to `true`.\n"],null,["# Notifications\n\nGeneric Passes support two types of notifications, you can configure either:\n\n1. Upcoming notification\n2. Expiry notification\n\nUpcoming notification\n---------------------\n\n[Upcoming notifications](/wallet/generic/rest/v1/genericobject#upcomingnotification)\nappear to the user 24 hours before the [time interval](/wallet/generic/rest/v1/TimeInterval)\nstarts.\n\nWhen the upcoming notification is configured, a notification with the title\n**\"`genericObject.cardTitle` is available now\"** and subtitle **\"View pass\"** will appear to the user.\n\nTo configure upcoming notifications, set the boolean value [UpcomingNotification.enabledNotification](/wallet/generic/rest/v1/genericobject#upcomingnotification)\nto `true`.\n\nExpiry notification\n-------------------\n\n[Expiry notifications](/wallet/generic/rest/v1/genericobject#expirynotification)\nappear 48 hours before the end of the [time interval](/wallet/generic/rest/v1/TimeInterval).\n\nWhen the notification is configured, a notification with the title\n**\"`genericObject.cardTitle` expires in \\[x\\] days\"** and subtitle **\"View pass\"** will appear to the user.\n\nTo configure upcoming notifications, set the boolean value\n[ExpiryNotification.enabledNotification](/wallet/generic/rest/v1/genericobject#expirynotification)\nto `true`."]]