getCloudSyncSwitchStatus(params: Object)

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

const { getCloudSyncSwitchStatus } = wear;

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

Description

Get cloud sync switch status.

Parameters

PropertyTypeRequiredDescription
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
PropertyTypeDescriptionWearKit Since
enabledbooleanSwitch statev1.6.0
syncTypenumberSync type: 0 for all, 1 for Wi-Fi; default 0.v1.6.0
modifyTimenumberUpdate time, default -1v1.6.0
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Error Code

Error CodeError Message
10001Internal error

Examples

Basic usage

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

wear.getCloudSyncSwitchStatus({
  success: (result) => {
    console.log('getCloudSyncSwitchStatus success', result);
  },
  fail: error => {
    console.error(error);
  },
});