title: Taro.startHCE(option)

sidebar_label: startHCE

Initializes the NFC module.

Reference

Type

  1. (option: Option) => Promise<NFCError>

Parameters

Option

Property Type Required Description
aid_list string[] Yes List of AIDs to be registered in the system
complete (res: any) => void No The callback function used when the API call completed (always executed whether the call succeeds or fails)
fail (res: any) => void No The callback function for a failed API call
success (res: Result) => void No The callback function for a successful API call

Sample Code

  1. Taro.startHCE({
  2. aid_list: ['F222222222']
  3. success: function (res) {
  4. console.log(res.errMsg)
  5. }
  6. })

API Support

API WeChat Mini-Program H5 React Native
Taro.startHCE ✔️