bindSlaveDevice(params: Object)

Requires:
OutdoorKit≥1.0.1@ray-js/ray≥1.4.40
Platforms:
iOSAndroid
import { outdoor } from '@ray-js/ray';

const { bindSlaveDevice } = outdoor;

// Promise usage
try {
  const res = await bindSlaveDevice({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Description

Bind a sub-device to the specified primary device

Parameters

PropertyTypeRequiredDescription
slaveDevIdstringYesSub-device ID
masterDevIdstringYesPrimary device ID
complete() => voidNoCompletion callback (executed on both success and failure)
NoCallback on successful API call
fail(params: Object) => voidNoFailure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

import { outdoor } from '@ray-js/ray'

outdoor.bindSlaveDevice({
  slaveDevId: "xx",
  masterDevId: "xx",
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});