Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.35 KB

api-react-native.md

File metadata and controls

36 lines (24 loc) · 1.35 KB

API method execHaloCmdRN

Importing the method

import {execHaloCmdRN} from '@arx-research/libhalo/api/react-native.js';

Call specification

async function execHaloCmdRN(nfcManager, command, options)

Input parameter: nfcManager

The NfcManager singleton instance as imported from react-native-nfc-manager library.

Input parameter: command

An object specifying the command name that you want to invoke, together with the additional command's arguments. Please check documentation of the available commands (HaLo Command Set) for more details.

Input parameter: options

Optional. An empty object.

Return value

The function will return a Promise that will resolve to an object. Object keys and values will depend on the command that was requested. Please check documentation of the available commands (HaLo Command Set) for more details.

Exceptions

  • HaloTagError: The command was executed but the tag had responded with an error. Check ex.name and ex.message for more details.
  • HaloLogicError: There was some logic error on the client side when trying to execute the command. Check ex.message for more details.
  • NFCOperationError: There was a low-level failure during NFC interaction. Check ex.message for more details.