PassConstraints
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Vùng chứa mọi quy tắc ràng buộc có thể được đặt khi thẻ và vé.
Trường |
screenshotEligibility |
enum (ScreenshotEligibility )
Ảnh chụp màn hình về điều kiện sử dụng thẻ và vé.
|
nfcConstraint[] |
enum (NfcConstraint )
Các quy tắc ràng buộc NFC đối với thẻ và vé.
|
ScreenshotEligibility
Xác định xem liệu/cách chụp ảnh màn hình của thẻ/vé.
Enum |
SCREENSHOT_ELIGIBILITY_UNSPECIFIED |
Giá trị mặc định, giống như ELIGIBLE. |
ELIGIBLE |
Hành vi mặc định cho tất cả Thẻ và vé hiện có nếu chưa thiết lập Quản lý ảnh chụp màn hình. Cho phép chụp ảnh màn hình trên thiết bị Android. |
INELIGIBLE |
Không cho phép chụp ảnh màn hình trên thiết bị Android. Xin lưu ý rằng các phiên bản cũ hơn của Wallet có thể vẫn cho phép chụp ảnh màn hình. |
NfcConstraint
Xác định các quy tắc ràng buộc NFC có thể có cho lượt truyền.
Enum |
NFC_CONSTRAINT_UNSPECIFIED |
Giá trị mặc định, không có quy tắc ràng buộc cụ thể. |
BLOCK_PAYMENT |
Thẻ thanh toán sẽ không được chuyển đi trong khi thẻ/vé được mở. |
BLOCK_CLOSED_LOOP_TRANSIT |
Thẻ đi phương tiện công cộng vòng khép kín sẽ không được truyền tải khi thẻ và vé đang mở. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003ePass constraints can be set to control screenshot eligibility and NFC behavior.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003escreenshotEligibility\u003c/code\u003e determines if screenshots of the pass are allowed on Android devices, with options for eligible or ineligible.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003enfcConstraint\u003c/code\u003e allows restrictions on NFC interactions when the pass is open, such as blocking payments or closed-loop transit cards.\u003c/p\u003e\n"],["\u003cp\u003eThe default behavior for screenshots is eligible, and there are no NFC constraints by default.\u003c/p\u003e\n"]]],["Pass constraints are defined through `screenshotEligibility` and `nfcConstraint`. `screenshotEligibility` controls screenshot capture with `ELIGIBLE` (default) or `INELIGIBLE` options. `nfcConstraint` manages NFC interactions, allowing `BLOCK_PAYMENT` to prevent payment card conveyance and `BLOCK_CLOSED_LOOP_TRANSIT` to block closed-loop transit card conveyance. Unspecified settings use default behaviors: `SCREENSHOT_ELIGIBILITY_UNSPECIFIED` defaults to `ELIGIBLE` and `NFC_CONSTRAINT_UNSPECIFIED` implies no constraints.\n"],null,["# PassConstraints\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [ScreenshotEligibility](#ScreenshotEligibility)\n- [NfcConstraint](#NfcConstraint)\n\nContainer for any constraints that may be placed on passes.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"screenshotEligibility\": enum (/wallet/reference/rest/v1/PassConstraints#ScreenshotEligibility), \"nfcConstraint\": [ enum (/wallet/reference/rest/v1/PassConstraints#NfcConstraint) ] } ``` |\n\n| Fields ||\n|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|\n| `screenshotEligibility` | `enum (`[ScreenshotEligibility](/wallet/reference/rest/v1/PassConstraints#ScreenshotEligibility)`)` The screenshot eligibility for the pass. |\n| `nfcConstraint[]` | `enum (`[NfcConstraint](/wallet/reference/rest/v1/PassConstraints#NfcConstraint)`)` The NFC constraints for the pass. |\n\nScreenshotEligibility\n---------------------\n\nDefines if/how screenshots may be taken of a pass.\n\n| Enums ||\n|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| `SCREENSHOT_ELIGIBILITY_UNSPECIFIED` | Default value, same as ELIGIBLE. |\n| `ELIGIBLE` | Default behavior for all existing Passes if ScreenshotEligibility is not set. Allows screenshots to be taken on Android devices. |\n| `INELIGIBLE` | Disallows screenshots to be taken on Android devices. Note that older versions of Wallet may still allow screenshots to be taken. |\n\nNfcConstraint\n-------------\n\nDefines possible NFC constraints for the pass.\n\n| Enums ||\n|------------------------------|------------------------------------------------------------------------|\n| `NFC_CONSTRAINT_UNSPECIFIED` | Default value, no specified constraint. |\n| `BLOCK_PAYMENT` | Payment cards will not be conveyed while the pass is open. |\n| `BLOCK_CLOSED_LOOP_TRANSIT` | Closed loop transit cards will not be conveyed while the pass is open. |"]]