# NfcA.getMaxTransceiveLength(Object object)

Gets the maximum length that can be transmitted

## Support

App capability | Android | iOS | PC | Harmony | Preview
---|---|---|---|---|---
Gadget | V3.38.0+ | **X** | **X** | V7.35.0+ | Preview
Web app | V3.44.0+ | **X** | **X** | V7.35.0+ | Preview

## Input
Inherits [standard object input](https://open.feishu.cn/document/uYjL24iN/ukzNy4SO3IjL5cjM), without extension property:

## Output
Extension property of the object returned in `success`:

Name | Data type | Description
---|---|---
length | number | Maximum length that can be transmitted

##  Sample code

**Notice**：This is just an example of how to use the current API. Please refer to the actual process: [NFC integration](https://open.feishu.cn/document/uYjL24iN/ugTN4YjL4UDO24CO1gjN)

```js
let adapter = tt.getNFCAdapter();
//Please make sure to scan an NFC-A type card first
let nfcA = adapter.getNfcA();
//Please ensure the connection is successful before obtaining the maximum transmission length
nfcA.getMaxTransceiveLength({
    success(res) {
        console.log(JSON.stringify(res))
    },
    fail(err) {
        console.log(`NfcA.getMaxTransceiveLength fail: ${JSON.stringify(err)}`)
    }
});
```
Sample return object for `success`:
```json
{"length":253,"errMsg":"nfcMaxTransceiveLength:ok"}
```
## Error code
If a `fail` object is returned, an [errno property](https://open.feishu.cn/document/uYjL24iN/uAjMuAjMuAjM/errno) that indicates the error code will be contained.

For more information about error codes, refer to [NFC API Error Codes](https://open.feishu.cn/document/uYjL24iN/uQzM4YjL0MDO24CNzgjN/nfc-error-codes).