Barcode
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ช่อง |
kind (deprecated) |
string
ระบุว่าทรัพยากรนี้เป็นประเภทใด ค่า: สตริงคงที่ "walletobjects#barcode"
|
type |
enum (BarcodeType )
ประเภทของบาร์โค้ด
|
renderEncoding |
enum (BarcodeRenderEncoding )
การเข้ารหัสการแสดงผลสำหรับบาร์โค้ด เมื่อระบุบาร์โค้ดจะแสดงผลในการเข้ารหัสที่กำหนด หรือ Google จะเลือกการเข้ารหัสที่รู้จักกันดี
|
value |
string
ค่าที่เข้ารหัสในบาร์โค้ด
|
alternateText |
string
ข้อความที่ไม่บังคับซึ่งจะแทนที่ข้อความเริ่มต้นที่แสดงใต้บาร์โค้ด ฟิลด์นี้ใช้สำหรับค่าที่เทียบเท่ากับค่าบาร์โค้ดที่มนุษย์อ่านได้ ซึ่งใช้เมื่อสแกนบาร์โค้ดไม่ได้
|
showCodeText |
object (LocalizedString )
ข้อความแบบไม่บังคับที่จะแสดงเมื่อบาร์โค้ดซ่อนอยู่หลังการคลิก ซึ่งจะเกิดขึ้นในกรณีที่บัตรเปิดใช้การแตะอัจฉริยะ หากไม่ได้ระบุไว้ Google จะเลือกค่าเริ่มต้น
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eBarcodes in Google Wallet can be customized with type, rendering encoding, value, alternate text, and display settings for code text.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ekind\u003c/code\u003e field is deprecated and should no longer be used.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eshowCodeText\u003c/code\u003e field controls text display when the barcode is hidden, often due to Smart Tap.\u003c/p\u003e\n"],["\u003cp\u003eBarcode values can include an optional human-readable \u003ccode\u003ealternateText\u003c/code\u003e for accessibility.\u003c/p\u003e\n"]]],["The core content describes the structure and fields of a barcode in a JSON format. Key information includes: `type` specifying the barcode type, `renderEncoding` defining how the barcode is rendered, and `value` containing the encoded data. `alternateText` provides a human-readable alternative, while `showCodeText` offers optional text when the barcode is hidden. The `kind` field is deprecated. The document describes each field's data type.\n"],null,["# Barcode\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"type\": enum (/wallet/reference/rest/v1/BarcodeType), \"renderEncoding\": enum (/wallet/reference/rest/v1/BarcodeRenderEncoding), \"value\": string, \"alternateText\": string, \"showCodeText\": { object (/wallet/reference/rest/v1/LocalizedString) } } ``` |\n\n| Fields ||\n|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` **(deprecated)** | `string` | This item is deprecated! Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#barcode\"`. |\n| `type` | `enum (`[BarcodeType](/wallet/reference/rest/v1/BarcodeType)`)` The type of barcode. |\n| `renderEncoding` | `enum (`[BarcodeRenderEncoding](/wallet/reference/rest/v1/BarcodeRenderEncoding)`)` The render encoding for the barcode. When specified, barcode is rendered in the given encoding. Otherwise best known encoding is chosen by Google. |\n| `value` | `string` The value encoded in the barcode. |\n| `alternateText` | `string` An optional text that will override the default text that shows under the barcode. This field is intended for a human readable equivalent of the barcode value, used when the barcode cannot be scanned. |\n| `showCodeText` | `object (`[LocalizedString](/wallet/reference/rest/v1/LocalizedString)`)` Optional text that will be shown when the barcode is hidden behind a click action. This happens in cases where a pass has Smart Tap enabled. If not specified, a default is chosen by Google. |"]]