registerGroupChange(params: Object)

Requires:
DeviceKit≥2.3.1@ray-js/ray≥0.6.23
Platforms:
iOSAndroid
import { device } from '@ray-js/ray';

const { registerGroupChange } = device;

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

Description

Start listening for group events

Parameters

PropertyTypeRequiredDescription
groupIdListstring[]YesgroupIdList List of group IDs
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 { device } from '@ray-js/ray'

device.registerGroupChange({
  groupIdList: ["xx"],
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});