NfcBarcode.GetBarcode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the barcode of an NfcBarcode tag.
[Android.Runtime.Register("getBarcode", "()[B", "")]
public byte[]? GetBarcode ();
[<Android.Runtime.Register("getBarcode", "()[B", "")>]
member this.GetBarcode : unit -> byte[]
Returns
a byte array containing the barcode
- Attributes
Remarks
Returns the barcode of an NfcBarcode tag.
Tags of #TYPE_KOVIO
return 16 bytes: <ul>
The first byte is 0x80 ORd with a manufacturer ID, corresponding to ISO/IEC 7816-6.
The second byte describes the payload data format. Defined data format types include the following:<ul> <li>0x00: Reserved for manufacturer assignment</li> <li>0x01: 96-bit URL with "http://www." prefix</li> <li>0x02: 96-bit URL with "https://www." prefix</li> <li>0x03: 96-bit URL with "http://" prefix</li> <li>0x04: 96-bit URL with "https://" prefix</li> <li>0x05: 96-bit GS1 EPC</li> <li>0x06-0xFF: reserved</li> </ul>
The following 12 bytes are payload:<ul> <li> In case of a URL payload, the payload is encoded in US-ASCII, following the limitations defined in RFC3987. <a href="http://www.ietf.org/rfc/rfc3987.txt">RFC 3987</a>
</li> <li> In case of GS1 EPC data, see GS1 Electronic Product Code (EPC) Tag Data Standard (TDS) for more details. </li> </ul>
The last 2 bytes comprise the CRC. </ul>
Does not cause any RF activity and does not block.
Java documentation for android.nfc.tech.NfcBarcode.getBarcode()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.