The method is utilized as Ndef.connect().
Attributes | Types | Default value | Required | Note |
success | function | - | Not required | Callback function for successful interface invocation |
fail | function | - | Not required | Callback function for unsuccessful interface invocation |
complete | function | - | Not required | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
The method is employed as Ndef.close().
Attributes | Types | Default value | Required | Note |
success | function | - | Not required | Callback function for successful interface invocation |
fail | function | - | Not required | Callback function for unsuccessful interface invocation |
complete | function | - | Not required | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
Error Codes | Error Message | Note |
13000 | The device does not support NFC | - |
13001 | The system's NFC switch is not activated. | - |
13010 | An unknown error occurred. | - |
13019 | user is not authorized | User Authorization Denied |
13011 | invalid parameter | Invalid parameter |
13012 | parse NdefMessage failed | Failed to parse the parameter into NdefMessage. |
13021 | NFC discovery already started | NFC scanning has already commenced. |
13018 | NFC discovery has not started | Attempted to halt NFC scanning without initiating it. |
13022 | Tech already connected | The tag has been successfully connected. |
13023 | Tech has not connected | Attempted to disconnect without a tag being connected. |
13013 | NFC tag has not been discovered | No NFC tag was detected. |
13014 | invalid tech | Invalid tag technology. |
13015 | unavailable tech | Failed to acquire the corresponding technology from the tag. |
13024 | function not support | The current tag technology does not support this feature. |
13017 | system internal error | The related read-write operation has failed. |
13016 | connect fail | Connection failed |
The method is utilized as Ndef.setTimeout(Object object).
Attributes | Types | Default value | Required | Note |
timeout | number | - | Supported | Setting the timeout duration (ms) |
success | function | - | Not required | Callback function for successful interface invocation |
fail | function | - | Not required | Callback function for unsuccessful interface invocation |
complete | function | - | Not required | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
Error Codes | Error Message | Note |
13000 | The device does not support NFC | - |
13001 | The system's NFC switch is not activated. | - |
13010 | An unknown error occurred. | - |
13019 | user is not authorized | User Authorization Denied |
13011 | invalid parameter | Invalid parameter |
13012 | parse NdefMessage failed | Failed to parse the parameter into NdefMessage. |
13021 | NFC discovery already started | NFC scanning has already commenced. |
13018 | NFC discovery has not started | Attempted to halt NFC scanning without initiating it. |
13022 | Tech already connected | The tag has been successfully connected. |
13023 | Tech has not connected | Attempted to disconnect without a tag being connected. |
13013 | NFC tag has not been discovered | No NFC tag was detected. |
13014 | invalid tech | Invalid tag technology. |
13015 | unavailable tech | Failed to acquire the corresponding technology from the tag. |
13024 | function not support | The current tag technology does not support this feature. |
13017 | system internal error | The related read-write operation has failed. |
13016 | connect fail | Connection failed |
The method is utilized as Ndef.isConnected().
Attributes | Types | Default value | Required | Note |
success | function | - | Not required | Callback function for successful interface invocation |
fail | function | - | Not required | Callback function for unsuccessful interface invocation |
complete | function | - | Not required | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
Error Codes | Error Message | Note |
13000 | The device does not support NFC | - |
13001 | The system's NFC switch is not activated. | - |
13010 | An unknown error occurred. | - |
13019 | user is not authorized | User Authorization Denied |
13011 | invalid parameter | Invalid parameter |
13012 | parse NdefMessage failed | Failed to parse the parameter into NdefMessage. |
13021 | NFC discovery already started | NFC scanning has already commenced. |
13018 | NFC discovery has not started | Attempted to halt NFC scanning without initiating it. |
13022 | Tech already connected | The tag has been successfully connected. |
13023 | Tech has not connected | Attempted to disconnect without a tag being connected. |
13013 | NFC tag has not been discovered | No NFC tag was detected. |
13014 | invalid tech | Invalid tag technology. |
13015 | unavailable tech | Failed to acquire the corresponding technology from the tag. |
13024 | function not support | The current tag technology does not support this feature. |
13017 | system internal error | The related read-write operation has failed. |
13016 | connect fail | Connection failed |
The method is utilized as Ndef.onNdefMessage(function callback).
The method is employed as Ndef.offNdefMessage(function callback).
The method is employed as Ndef.writeNdefMessage(Object object).
Attributes | Types | Default value | Required | Note |
uris | Array | - | Not required | URI array. |
texts | Array | - | Not required | Text array. |
records | Array | - | Not required | An array of binary objects, requiring specification of id, type, and payload (all of which are of the ArrayBuffer type). |
success | function | - | Not required | Callback function for successful interface invocation |
fail | function | - | Not required | Callback function for unsuccessful interface invocation |
complete | function | - | Not required | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
Error Codes | Error Message | Note |
13000 | The device does not support NFC | - |
13001 | The system's NFC switch is not activated. | - |
13010 | An unknown error occurred. | - |
13019 | user is not authorized | User Authorization Denied |
13011 | invalid parameter | Invalid parameter |
13012 | parse NdefMessage failed | Failed to parse the parameter into NdefMessage. |
13021 | NFC discovery already started | NFC scanning has already commenced. |
13018 | NFC discovery has not started | Attempted to halt NFC scanning without initiating it. |
13022 | Tech already connected | The tag has been successfully connected. |
13023 | Tech has not connected | Attempted to disconnect without a tag being connected. |
13013 | NFC tag has not been discovered | No NFC tag was detected. |
13014 | invalid tech | Invalid tag technology. |
13015 | unavailable tech | Failed to acquire the corresponding technology from the tag. |
13024 | function not support | The current tag technology does not support this feature. |
13017 | system internal error | The related read-write operation has failed. |
13016 | connect fail | Connection failed |
Was this page helpful?