Barcode
欄位 |
kind (deprecated) |
string
表示資源的種類。值:固定字串 "walletobjects#barcode" 。
|
type |
enum (BarcodeType )
條碼類型。
|
renderEncoding |
enum (BarcodeRenderEncoding )
條碼的轉譯編碼。如有指定,則會以指定的編碼轉譯條碼;如未指定,則由 Google 選擇最著名的編碼。
|
value |
string
條碼中的編碼值。
|
alternateText |
string
選用文字,會覆寫條碼下方顯示的預設文字內容。這個欄位用於提供使用者能夠理解的條碼值對應內容,條碼無法掃描時即可派上用場。
|
showCodeText |
object (LocalizedString )
條碼為隱藏,需執行點選動作後才會顯示,選填文字。如果票證啟用智慧感應功能,就會發生這種情形。如未指定,則由 Google 選擇預設值。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-13 (世界標準時間)。
[null,null,["上次更新時間:2024-11-13 (世界標準時間)。"],[[["Barcodes in Google Wallet can be customized with type, rendering encoding, value, alternate text, and display settings for code text."],["The `kind` field is deprecated and should no longer be used."],["`showCodeText` field controls text display when the barcode is hidden, often due to Smart Tap."],["Barcode values can include an optional human-readable `alternateText` for accessibility."]]],["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"]]