openSystemSettingPage(params: Object)

Requires:
BizKit≥3.0.0@ray-js/ray≥1.5.19
Platforms:
iOSAndroid
import { openSystemSettingPage } from '@ray-js/ray';

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

Description

Note: Due to review/security risks, on iOS calling this method only opens the Settings page for the current app and no longer supports the following scopes. Depending on the scope value, it opens the corresponding system Settings screen: "Settings" -> device Settings home; "Settings-Bluetooth" -> Bluetooth settings; "Settings-WiFi" -> WiFi settings; "Settings-Location" -> Location settings; "Settings-Notification" -> Notification settings

Parameters

PropertyTypeRequiredDescription
scopestringYesSystem navigation — settings item names "Settings" -> device Settings home "Settings-Bluetooth" -> device Bluetooth settings "Settings-WiFi" -> device WiFi settings "Settings-Location" -> device Location settings "Settings-Notification" -> device Notification settings System navigation — app settings item names "App-Settings" -> App settings page "App-Settings-Permission" -> App permission settings (Android only) "App-Settings-Notification" -> App notification settings (Android only)
requestCodenumberNoRequest code (Android only)
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 { openSystemSettingPage } from '@ray-js/ray'

openSystemSettingPage({
  scope: "xx",
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});