vibrateLong(params: Object)

Requires:
BaseKit≥2.3.2@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
import { vibrateLong } from '@ray-js/ray';

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

Description

Trigger a long vibration (400 ms)

Parameters

PropertyTypeRequiredDescription
complete() => voidNoCompletion callback (executed on both success and failure)
success() => voidNoCallback 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 { vibrateLong } from '@ray-js/ray'

vibrateLong({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});