openSetting(params: Object)

Requires:
MiniKit≥2.6.0@ray-js/ray≥0.5.9
Platforms:
iOSAndroid
import { openSetting } from '@ray-js/ray';

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

Description

Open the client mini program settings page and return the result of the user’s settings.

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
PropertyTypeDescriptionMiniKit Since
User authorization settingsv3.2.0
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

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

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