recordTransferTask(params: Object)

Requires:
WearKit≥1.0.0@ray-js/ray≥1.7.14
Platforms:
iOSAndroid
import { wear } from '@ray-js/ray';

const { recordTransferTask } = wear;

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

Description

Get recording transcription task.

Parameters

PropertyTypeRequiredDescription
deviceIdstringNodeviceId; if empty, checks whether the current app has a recording task
complete() => voidNoCompletion callback (executed on both success and failure)
success(params: Object) => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
success callback parameters
PropertyTypeDescription
Recording task information
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Error Code

Error CodeError Message
10001Internal error
10048Device is not recording

Examples

Basic usage

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

wear.recordTransferTask({
  deviceId: 'dev',
  success: (result) => {
    console.log('recordTransferTask success', result.task);
  },
  fail: error => {
    console.error(error);
  },
});