openSystemBluetoothSetting(params: Object)

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

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

Description

Open the system Bluetooth settings page (Android only)

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 { openSystemBluetoothSetting } from '@ray-js/ray'

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