getMobileDeviceInfo(params: Object)

Requires:
BaseKit≥2.4.3@ray-js/ray≥1.6.8
Platforms:
iOSAndroid
import { getMobileDeviceInfo } from '@ray-js/ray';

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

Description

Get basic device information

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
PropertyTypeDescriptionBaseKit Since
abistringApplication Binary Interface (ABI) type (Android only)v3.2.6
brandstringDevice brandv3.2.6
modelstringDevice model. Newly released models may show "unknown" for a period.v3.2.6
systemstringOS and versionv3.2.6
platformstringSystem type, e.g., ios, android, harmonyv3.2.6
uuidstringUnique device identifierv3.35.5
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

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

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