Pico Unity XR SDK
PXR_System Class Reference

Static Public Member Functions

static void InitSystemService (string objectName)
 Initializes the system service for a specified game object.
Note: Must be called before calling other system related functions. More...
 
static void BindSystemService ()
 Binds the system service.
Note: Must be called before calling other system related functions. More...
 
static void UnBindSystemService ()
 Unbinds the system service. More...
 
static bool StartBatteryReceiver (string objName)
 Turns on the battery service. More...
 
static bool StopBatteryReceiver ()
 Turns off the battery service. More...
 
static bool SetCommonBrightness (int brightness)
 Sets the brightness for the current HMD. More...
 
static int GetCommonBrightness ()
 Gets the brightness of the current HMD. More...
 
static int[] GetScreenBrightnessLevel ()
 Gets the brightness level of the current screen. More...
 
static void SetScreenBrightnessLevel (int brightness, int level)
 Sets a brightness level for the current screen. More...
 
static bool InitAudioDevice ()
 Initializes the audio device. More...
 
static bool StartAudioReceiver (string objName)
 Turns on the volume service for a specified game pbject. More...
 
static bool StopAudioReceiver ()
 Turns off the volume service. More...
 
static int GetMaxVolumeNumber ()
 Gets the maximum volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function. More...
 
static int GetCurrentVolumeNumber ()
 Gets the current volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function. More...
 
static bool VolumeUp ()
 Increases the volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function. More...
 
static bool VolumeDown ()
 Decreases the volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function. More...
 
static bool SetVolumeNum (int volume)
 Sets the volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function. More...
 
static PXR_PlatformSetting.simulationType IsCurrentDeviceValid ()
 Checks whether the current device has valid permission for the game. More...
 
static string GetSDKVersion ()
 Gets the SDK version. More...
 
static double GetPredictedDisplayTime ()
 Gets the predicted time a frame will be displayed after being rendered. More...
 
static bool SetExtraLatencyMode (int mode)
 Sets the extra latency mode. Note: Call this function once only. More...
 
static string StateGetDeviceInfo (SystemInfoEnum type)
 Gets the specified type of device information. More...
 
static void ControlSetDeviceAction (DeviceControlEnum deviceControl, Action< int > callback)
 Controls the device to shut down or reboot. More...
 
static void ControlAPPManager (PackageControlEnum packageControl, string path, Action< int > callback)
 Installs or uninstalls app silently. More...
 
static void ControlSetAutoConnectWIFI (string ssid, string pwd, Action< bool > callback)
 Sets a Wi-Fi that the device is automatically connected to. More...
 
static void ControlClearAutoConnectWIFI (Action< bool > callback)
 Removes the Wi-Fi that the device is automatically connected to. More...
 
static void PropertySetHomeKey (HomeEventEnum eventEnum, HomeFunctionEnum function, Action< bool > callback)
 Sets the Home key event. More...
 
static void PropertySetHomeKeyAll (HomeEventEnum eventEnum, HomeFunctionEnum function, int timesetup, string pkg, string className, Action< bool > callback)
 Sets extended settings for the Home key. More...
 
static void PropertyDisablePowerKey (bool isSingleTap, bool enable, Action< int > callback)
 Sets the Power key event. More...
 
static void PropertySetScreenOffDelay (ScreenOffDelayTimeEnum timeEnum, Action< int > callback)
 Sets the time the screen turns off when the device is not in use. More...
 
static void PropertySetSleepDelay (SleepDelayTimeEnum timeEnum)
 Sets the time the system sleeps when the device is not in use. More...
 
static void SwitchSystemFunction (SystemFunctionSwitchEnum systemFunction, SwitchEnum switchEnum)
 Switches specified system function on/off. More...
 
static void SwitchSetUsbConfigurationOption (USBConfigModeEnum uSBConfigModeEnum)
 Sets the USB configuration mode. More...
 
static void ScreenOn ()
 Turns the screen on. More...
 
static void ScreenOff ()
 Turns the screen off. More...
 
static void AcquireWakeLock ()
 Acquires the wake lock. More...
 
static void ReleaseWakeLock ()
 Releases the wake lock. More...
 
static void EnableEnterKey ()
 Enables the Confirm key. More...
 
static void DisableEnterKey ()
 Disables the Confirm key. More...
 
static void EnableVolumeKey ()
 Enables the Volume Key. More...
 
static void DisableVolumeKey ()
 Disables the Volume Key. More...
 
static void EnableBackKey ()
 Enables the Back Key. More...
 
static void DisableBackKey ()
 Disables the Back Key. More...
 
static void WriteConfigFileToDataLocal (string path, string content, Action< bool > callback)
 Writes the configuration file to the /data/local/tmp/ path. More...
 
static void ResetAllKeyToDefault (Action< bool > callback)
 Resets all keys to default configuration. More...
 
static void SetAPPAsHome (SwitchEnum switchEnum, string packageName)
 Sets an app as the launcher app. More...
 
static void KillAppsByPidOrPackageName (int[] pids, string[] packageNames)
 Force quits app(s) by passing app PID or package name. More...
 
static void KillBackgroundAppsWithWhiteList (string[] packageNames)
 Force quits background app(s) expect those in the allowlist. More...
 
static void FreezeScreen (bool freeze)
 Freezes the screen to the front. The screen will turn around with the HMD.
Note: This function only supports G2 4K series. More...
 
static void OpenMiracast ()
 Turns on the screencast function. More...
 
static bool IsMiracastOn ()
 Gets the status of the screencast function. More...
 
static void CloseMiracast ()
 Turns off the screencast function. More...
 
static void StartScan ()
 Starts scanning for devices that can be used for screen casting. More...
 
static void StopScan ()
 Stops scanning for devices that can be used for screen casting. More...
 
static void ConnectWifiDisplay (string modelJson)
 Casts the screen to the specified device. More...
 
static void DisConnectWifiDisplay ()
 Stops casting the screen to the current device. More...
 
static void ForgetWifiDisplay (string address)
 Forgets the device that have been connected for screencast. More...
 
static void RenameWifiDisplay (string address, string newName)
 Renames the device connected for screencast (only the name for local storage). More...
 
static void SetWDModelsCallback ()
 Returns a wdmodel list of the device(s) for screencast. More...
 
static void SetWDJsonCallback ()
 Returns a JSON array of the device(s) for screencast. More...
 
static void UpdateWifiDisplays (Action< string > callback)
 Manually updates the device list for screencast. More...
 
static string GetConnectedWD ()
 Gets the information of the current connected device. More...
 
static void SwitchLargeSpaceScene (bool open, Action< bool > callback)
 Switches the large space scene on. More...
 
static void GetSwitchLargeSpaceStatus (Action< string > callback)
 Gets the status of the large space scene. More...
 
static bool SaveLargeSpaceMaps ()
 Saves the large space map. More...
 
static void ExportMaps (Action< bool > callback)
 Exports map(s). More...
 
static void ImportMaps (Action< bool > callback)
 Imports map(s). More...
 
static int GetSensorStatus ()
 Gets the sensor's status. More...
 
static void SetSystemDisplayFrequency (float rate)
 Sets the system display frequency rate. More...
 
static float GetSystemDisplayFrequency ()
 Gets the system display frequency rate. More...
 
static void SetLargeSpaceEnable (bool value)
 Gets whether the current app supports large space. More...
 
static int GetPredictedMainSensorStateNew (ref PxrSensorState2 sensorState, ref int sensorFrameIndex)
 Gets the predicted status of the sensor. More...
 
static float[] GetCpuUsages ()
 Gets the CPU utilization of the current device. More...
 
static float[] GetDeviceTemperatures (int type, int source)
 Gets device temperature in Celsius. More...
 
static void Capture ()
 Captures the current screen. More...
 
static void Record ()
 Records the screen. Call this function again to stop recording. More...
 
static void ControlSetAutoConnectWIFIWithErrorCodeCallback (String ssid, String pwd, int ext, Action< int > callback)
 Connects the device to a specified Wi-Fi.
More...
 
static void AppKeepAlive (String appPackageName, bool keepAlive, int ext)
 Keeps an app active. In other words, improves the priority of an app, thereby making the system not to force quit the app. More...
 
static void TimingStartup (int year, int month, int day, int hour, int minute, bool open)
 Schedules automatic startup for the device.
Note: Supported by Neo 3 series only. More...
 
static void TimingShutdown (int year, int month, int day, int hour, int minute, bool open)
 Schedules automatic shutdown for the device.
Note: Supported by Neo 3 series only. More...
 
static void StartVrSettingsItem (StartVRSettingsEnum settingsEnum, bool showOtherItem, int ext)
 Displays a specified settings screen.
Note: Supported by Neo 3 series only. More...
 

Member Function Documentation

◆ InitSystemService()

static void InitSystemService ( string  objectName)
static

Initializes the system service for a specified game object.
Note: Must be called before calling other system related functions.

Parameters
objectNameThe name of the game object to initialize the system service for.

◆ BindSystemService()

static void BindSystemService ( )
static

Binds the system service.
Note: Must be called before calling other system related functions.

◆ UnBindSystemService()

static void UnBindSystemService ( )
static

Unbinds the system service.

◆ StartBatteryReceiver()

static bool StartBatteryReceiver ( string  objName)
static

Turns on the battery service.

Parameters
objNameThe name of the game object to turn on the battery service for.
Returns
Whether the power service has been turned on:
  • true: succeeded
  • false: failed

◆ StopBatteryReceiver()

static bool StopBatteryReceiver ( )
static

Turns off the battery service.

Returns
Whether the power service has been turned off:
  • true: succeeded
  • false: failed

◆ SetCommonBrightness()

static bool SetCommonBrightness ( int  brightness)
static

Sets the brightness for the current HMD.

Parameters
brightnessTarget brightness. The valid value ranges from 0 to 255.
Returns
Whether the brightness has been set successfully:
  • true: succeeded
  • false: failed

◆ GetCommonBrightness()

static int GetCommonBrightness ( )
static

Gets the brightness of the current HMD.

Returns
An int value that indicates the brightness. The value ranges from 0 to 255.

◆ GetScreenBrightnessLevel()

static int[] GetScreenBrightnessLevel ( )
static

Gets the brightness level of the current screen.

Returns
An int array. The first bit is the total brightness level supported, the second bit is the current brightness level, and it is the interval value of the brightness level from the third bit to the end bit.

◆ SetScreenBrightnessLevel()

static void SetScreenBrightnessLevel ( int  brightness,
int  level 
)
static

Sets a brightness level for the current screen.

Parameters
brightnessBrightness mode:
  • 0: system default brightness setting
  • 1: custom brightness setting
levelBrightness level. The valid value ranges from 1 to 255. If brightness is set to 1, set a desired brightness level; if brightness is set to 0, the system default brightness setting is adopted.

◆ InitAudioDevice()

static bool InitAudioDevice ( )
static

Initializes the audio device.

Returns
Whether the audio device has been initialized:
  • true: succeeded
  • false: failed

◆ StartAudioReceiver()

static bool StartAudioReceiver ( string  objName)
static

Turns on the volume service for a specified game pbject.

Parameters
objNameThe name of the game object to turn on the volume service for.
Returns
Whether the volume service has been turned on:
  • true: succeeded
  • false: failed

◆ StopAudioReceiver()

static bool StopAudioReceiver ( )
static

Turns off the volume service.

Returns
Whether the volume service has been turned off:
  • true: succeeded
  • false: failed

◆ GetMaxVolumeNumber()

static int GetMaxVolumeNumber ( )
static

Gets the maximum volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function.

Returns
An int value that indicates the maximum volume.

◆ GetCurrentVolumeNumber()

static int GetCurrentVolumeNumber ( )
static

Gets the current volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function.

Returns
An int value that indicates the current volume. The value ranges from 0 to 15.

◆ VolumeUp()

static bool VolumeUp ( )
static

Increases the volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function.

Returns
Whether the volume has been increased:
  • true: succeeded
  • false: failed

◆ VolumeDown()

static bool VolumeDown ( )
static

Decreases the volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function.

Returns
Whether the volume has been decreased:
  • true: succeeded
  • false: failed

◆ SetVolumeNum()

static bool SetVolumeNum ( int  volume)
static

Sets the volume.
Note: Call InitAudioDevice to initialize the audio device before calling this function.

Parameters
volumeThe target volume. The valid value ranges from 0 to 15.
Returns
Whether the target volume has been set:
  • true: succeeded
  • false: failed

◆ IsCurrentDeviceValid()

static PXR_PlatformSetting.simulationType IsCurrentDeviceValid ( )
static

Checks whether the current device has valid permission for the game.

Returns
Whether the permission is valid:
  • Null
  • Invalid
  • Valid

◆ GetSDKVersion()

static string GetSDKVersion ( )
static

Gets the SDK version.

Returns
The SDK version.

◆ GetPredictedDisplayTime()

static double GetPredictedDisplayTime ( )
static

Gets the predicted time a frame will be displayed after being rendered.

Returns
The predicted time (in miliseconds).

◆ SetExtraLatencyMode()

static bool SetExtraLatencyMode ( int  mode)
static

Sets the extra latency mode. Note: Call this function once only.

Parameters
modeThe latency mode:
  • 0: ExtraLatencyModeOff (Disable ExtraLatencyMode mode. This option will display the latest rendered frame for display)
  • 1: ExtraLatencyModeOn (Enable ExtraLatencyMode mode. This option will display one frame prior to the latest rendered frame)
  • 2: ExtraLatencyModeDynamic (Use system default setup)
Returns
Whether the extra latency mode has been set:
  • true: succeeded
  • false: failed

◆ StateGetDeviceInfo()

static string StateGetDeviceInfo ( SystemInfoEnum  type)
static

Gets the specified type of device information.

Parameters
typeThe target informaiton type. Enumerations:
  • ELECTRIC_QUANTITY: battery
  • PUI_VERSION: PUI version
  • EQUIPMENT_MODEL: device model
  • EQUIPMENT_SN: device SN code
  • CUSTOMER_SN: customer SN code
  • INTERNAL_STORAGE_SPACE_OF_THE_DEVICE: device storage
  • DEVICE_BLUETOOTH_STATUS: bluetooth status
  • BLUETOOTH_NAME_CONNECTED: bluetooth name
  • BLUETOOTH_MAC_ADDRESS: bluetooth MAC address
  • DEVICE_WIFI_STATUS: Wi-Fi connection status
  • WIFI_NAME_CONNECTED: connected Wi-Fi name
  • WLAN_MAC_ADDRESS: WLAN MAC address
  • DEVICE_IP: device IP address
  • CHARGING_STATUS: device charging status
Returns
The specified type of device information.
Note: For CHARGING_STATUS, an int value will be returned: 2-charging; 3-not charging.

◆ ControlSetDeviceAction()

static void ControlSetDeviceAction ( DeviceControlEnum  deviceControl,
Action< int >  callback 
)
static

Controls the device to shut down or reboot.

Parameters
deviceControlDevice action. Enumerations:
  • DEVICE_CONTROL_REBOOT: reboot the device
  • DEVICE_CONTROL_SHUTDOWN: shut down the device
callbackCallback:
  • 1: failed to shut down or reboot the device
  • 2: no permission for device control

◆ ControlAPPManager()

static void ControlAPPManager ( PackageControlEnum  packageControl,
string  path,
Action< int >  callback 
)
static

Installs or uninstalls app silently.

Parameters
packageControlThe action. Enumerations:
  • PACKAGE_SILENCE_INSTALL: silent installation
  • PACKAGE_SILENCE_UNINSTALL: silent uninstallation
pathThe path to the app package for silent installation or the name of the app package for silent uninstallation.
callbackCallback:
  • 0: succeeded
  • 1: failed
  • 2: no permission for this operation

◆ ControlSetAutoConnectWIFI()

static void ControlSetAutoConnectWIFI ( string  ssid,
string  pwd,
Action< bool >  callback 
)
static

Sets a Wi-Fi that the device is automatically connected to.

Parameters
ssidWi-Fi name.
pwdWi-Fi password.
callbackCallback:
  • true: connected
  • false: failed to connect

◆ ControlClearAutoConnectWIFI()

static void ControlClearAutoConnectWIFI ( Action< bool >  callback)
static

Removes the Wi-Fi that the device is automatically connected to.

Parameters
callbackCallback:
  • true: removed
  • false: failed to remove

◆ PropertySetHomeKey()

static void PropertySetHomeKey ( HomeEventEnum  eventEnum,
HomeFunctionEnum  function,
Action< bool >  callback 
)
static

Sets the Home key event.

Parameters
eventEnumTarget event. Enumerations:
  • SINGLE_CLICK
  • DOUBLE_CLICK
functionThe function of the event. Enumerations:
  • VALUE_HOME_GO_TO_SETTING: go to Settings
  • VALUE_HOME_RECENTER: recenter
  • VALUE_HOME_DISABLE: disable the event of the Home key
  • VALUE_HOME_GO_TO_HOME: go to Home
callbackCallback:
  • true: set
  • false: failed to set

◆ PropertySetHomeKeyAll()

static void PropertySetHomeKeyAll ( HomeEventEnum  eventEnum,
HomeFunctionEnum  function,
int  timesetup,
string  pkg,
string  className,
Action< bool >  callback 
)
static

Sets extended settings for the Home key.

Parameters
eventEnumTarget event. Enumerations:
  • SINGLE_CLICK
  • DOUBLE_CLICK
functionThe function of the event. Enumerations:
  • VALUE_HOME_GO_TO_SETTING: go to Settings
  • VALUE_HOME_RECENTER: recenter
  • VALUE_HOME_DISABLE: disable the event of the Home key
  • VALUE_HOME_GO_TO_HOME: go to Home
timesetupThe interval of key pressing is set only if there is the double click event or long pressing event. When shortly pressing the Home key, pass 0.
pkgPass null.
classNamePass null.
callbackCallback:
  • true: set
  • false: failed to set

◆ PropertyDisablePowerKey()

static void PropertyDisablePowerKey ( bool  isSingleTap,
bool  enable,
Action< int >  callback 
)
static

Sets the Power key event.

Parameters
isSingleTapWhether it is a single click event:
  • true: single-click event
  • false: long-pressing event
enableKey enabling status:
  • true: enabled
  • false: disabled
callbackCallback:
  • 0: set
  • 1: failed to set
  • 11: press the Power key for no more than 5s

◆ PropertySetScreenOffDelay()

static void PropertySetScreenOffDelay ( ScreenOffDelayTimeEnum  timeEnum,
Action< int >  callback 
)
static

Sets the time the screen turns off when the device is not in use.

Parameters
timeEnumScreen off timeout. Enumerations:
  • Never: never off
  • THREE: 3s
  • TEN: 10s
  • THIRTY: 30s
  • SIXTY: 60s
  • THREE_HUNDRED: 5 mins
  • SIX_HUNDRED: 10 mins
callbackCallback:
  • 0: set
  • 1: failed to set
  • 10: the screen off timeout should not be greater than the system sleep timeout

◆ PropertySetSleepDelay()

static void PropertySetSleepDelay ( SleepDelayTimeEnum  timeEnum)
static

Sets the time the system sleeps when the device is not in use.

Parameters
timeEnumSystem sleep timeout. Enumerations:
  • Never: never sleep
  • FIFTEEN: 15s
  • THIRTY: 30s
  • SIXTY: 60s
  • THREE_HUNDRED: 5 mins
  • SIX_HUNDRED: 10 mins
  • ONE_THOUSAND_AND_EIGHT_HUNDRED: 30 mins

◆ SwitchSystemFunction()

static void SwitchSystemFunction ( SystemFunctionSwitchEnum  systemFunction,
SwitchEnum  switchEnum 
)
static

Switches specified system function on/off.

Parameters
systemFunctionFunction name. Enumerations:
  • SFS_USB: USB debugging
  • SFS_AUTOSLEEP: auto sleep
  • SFS_SCREENON_CHARGING: screen-on charging
  • SFS_OTG_CHARGING: OTG charging
  • SFS_RETURN_MENU_IN_2DMODE: display the Return icon on 2D screen
  • SFS_COMBINATION_KEY: combination key
  • SFS_CALIBRATION_WITH_POWER_ON: calibration with power on
  • SFS_SYSTEM_UPDATE: system update
  • SFS_CAST_SERVICE: casting service, not valid when using Pico Enterprise Solution
  • SFS_EYE_PROTECTION: eye-protection mode
  • SFS_SECURITY_ZONE_PERMANENTLY: disable 6DoF safety boundary permanently
  • SFS_Auto_Calibration: auto recenter/recalibrate
  • SFS_USB_BOOT: USB plug-in boot
  • SFS_VOLUME_UI: global volume UI
  • SFS_CONTROLLER_UI: global controller connected UI
  • SFS_NAVGATION_SWITCH: navigation bar
  • SFS_SHORTCUT_SHOW_RECORD_UI: Screen Recording button UI
  • SFS_SHORTCUT_SHOW_FIT_UI: Pico fit UI
  • SFS_SHORTCUT_SHOW_CAST_UI: Screencast button UI
  • SFS_SHORTCUT_SHOW_CAPTURE_UI: Screenshot button UI
  • SFS_STOP_MEM_INFO_SERVICE: force quit 2D application
  • SFS_USB_FORCE_HOST: set Neo3 device as the host device
  • SFS_SET_DEFAULT_SAFETY_ZONE: set default boundary for Neo3 device
  • SFS_ALLOW_RESET_BOUNDARY: allow to reset customized boundary
  • SFS_BOUNDARY_CONFIRMATION_SCREEN: whether to display the boundary confirmation screen
  • SFS_LONG_PRESS_HOME_TO_RECENTER: long press the Home key to recenter
  • SFS_POWER_CTRL_WIFI_ENABLE: Neo3 device stays connected to the network when the device sleeps/turns off
  • SFS_WIFI_DISABLE: disable Wi-Fi for Neo3 device
switchEnumWhether to switch the function on/off:
  • S_ON: switch on
  • S_OFF: switch off

◆ SwitchSetUsbConfigurationOption()

static void SwitchSetUsbConfigurationOption ( USBConfigModeEnum  uSBConfigModeEnum)
static

Sets the USB configuration mode.

Parameters
uSBConfigModeEnumUSB configuration mode. Enumerations:
  • MTP: MTP mode
  • CHARGE: charging mode

◆ ScreenOn()

static void ScreenOn ( )
static

Turns the screen on.

◆ ScreenOff()

static void ScreenOff ( )
static

Turns the screen off.

◆ AcquireWakeLock()

static void AcquireWakeLock ( )
static

Acquires the wake lock.

◆ ReleaseWakeLock()

static void ReleaseWakeLock ( )
static

Releases the wake lock.

◆ EnableEnterKey()

static void EnableEnterKey ( )
static

Enables the Confirm key.

◆ DisableEnterKey()

static void DisableEnterKey ( )
static

Disables the Confirm key.

◆ EnableVolumeKey()

static void EnableVolumeKey ( )
static

Enables the Volume Key.

◆ DisableVolumeKey()

static void DisableVolumeKey ( )
static

Disables the Volume Key.

◆ EnableBackKey()

static void EnableBackKey ( )
static

Enables the Back Key.

◆ DisableBackKey()

static void DisableBackKey ( )
static

Disables the Back Key.

◆ WriteConfigFileToDataLocal()

static void WriteConfigFileToDataLocal ( string  path,
string  content,
Action< bool >  callback 
)
static

Writes the configuration file to the /data/local/tmp/ path.

Parameters
pathThe path to the configuration file, e.g., /data/local/tmp/config.txt.
contentThe content of the configuration file.
callbackCallback:
  • true: written
  • false: failed to be written

◆ ResetAllKeyToDefault()

static void ResetAllKeyToDefault ( Action< bool >  callback)
static

Resets all keys to default configuration.

Parameters
callbackCallback:
  • true: reset
  • false: failed to reset

◆ SetAPPAsHome()

static void SetAPPAsHome ( SwitchEnum  switchEnum,
string  packageName 
)
static

Sets an app as the launcher app.

Parameters
switchEnumSwitch. Enumerations:
  • S_ON: set the app as the launcher app
  • S_OFF: cancel setting the app as the launcher app
packageNameThe app package name.

◆ KillAppsByPidOrPackageName()

static void KillAppsByPidOrPackageName ( int[]  pids,
string[]  packageNames 
)
static

Force quits app(s) by passing app PID or package name.

Parameters
pidsAn array of app PID(s).
packageNamesAn array of package name(s).

◆ KillBackgroundAppsWithWhiteList()

static void KillBackgroundAppsWithWhiteList ( string[]  packageNames)
static

Force quits background app(s) expect those in the allowlist.

Parameters
packageNamesAn array of package name(s) to be added to the allowlist. The corresponding app(s) in the allowlist will not be force quit.

◆ FreezeScreen()

static void FreezeScreen ( bool  freeze)
static

Freezes the screen to the front. The screen will turn around with the HMD.
Note: This function only supports G2 4K series.

Parameters
freezeWhether to freeze the screen:
  • true: freeze
  • false: do not freeze

◆ OpenMiracast()

static void OpenMiracast ( )
static

Turns on the screencast function.

◆ IsMiracastOn()

static bool IsMiracastOn ( )
static

Gets the status of the screencast function.

Returns
The status of the screencast function:
  • true: screencast on
  • false: screencast off

◆ CloseMiracast()

static void CloseMiracast ( )
static

Turns off the screencast function.

◆ StartScan()

static void StartScan ( )
static

Starts scanning for devices that can be used for screen casting.

◆ StopScan()

static void StopScan ( )
static

Stops scanning for devices that can be used for screen casting.

◆ ConnectWifiDisplay()

static void ConnectWifiDisplay ( string  modelJson)
static

Casts the screen to the specified device.

Parameters
modelJsonA modelJson structure containing the following fields:
  • deviceAddress
  • deviceName
  • isAvailable (true-device available; false-device not available)

◆ DisConnectWifiDisplay()

static void DisConnectWifiDisplay ( )
static

Stops casting the screen to the current device.

◆ ForgetWifiDisplay()

static void ForgetWifiDisplay ( string  address)
static

Forgets the device that have been connected for screencast.

Parameters
addressDevice address.

◆ RenameWifiDisplay()

static void RenameWifiDisplay ( string  address,
string  newName 
)
static

Renames the device connected for screencast (only the name for local storage).

Parameters
addressThe MAC address of the device.
newNameThe new device name.

◆ SetWDModelsCallback()

static void SetWDModelsCallback ( )
static

Returns a wdmodel list of the device(s) for screencast.

◆ SetWDJsonCallback()

static void SetWDJsonCallback ( )
static

Returns a JSON array of the device(s) for screencast.

◆ UpdateWifiDisplays()

static void UpdateWifiDisplays ( Action< string >  callback)
static

Manually updates the device list for screencast.

Parameters
callbackThe device list for screencast.

◆ GetConnectedWD()

static string GetConnectedWD ( )
static

Gets the information of the current connected device.

Returns
The information of the current connected device.

◆ SwitchLargeSpaceScene()

static void SwitchLargeSpaceScene ( bool  open,
Action< bool >  callback 
)
static

Switches the large space scene on.

Parameters
openWhether to switch the large space scene on:
  • true: switch on
  • false: switch off
callbackCallback:
  • true: succeeded
  • false: failed

◆ GetSwitchLargeSpaceStatus()

static void GetSwitchLargeSpaceStatus ( Action< string >  callback)
static

Gets the status of the large space scene.

Parameters
callbackCallback:
  • true: status got
  • false: failed to get the status

◆ SaveLargeSpaceMaps()

static bool SaveLargeSpaceMaps ( )
static

Saves the large space map.

Returns
Whether the large space map has been saved:
  • true: saved
  • false: failed to save

◆ ExportMaps()

static void ExportMaps ( Action< bool >  callback)
static

Exports map(s).

Parameters
callbackCallback:
  • true: exported
  • false: failed to export

◆ ImportMaps()

static void ImportMaps ( Action< bool >  callback)
static

Imports map(s).

Parameters
callbackCallback:
  • true: imported
  • false: failed to import

◆ GetSensorStatus()

static int GetSensorStatus ( )
static

Gets the sensor's status.

Returns
The sensor's status:
  • 0: null
  • 1: 3 DoF
  • 3: 6 DoF

◆ SetSystemDisplayFrequency()

static void SetSystemDisplayFrequency ( float  rate)
static

Sets the system display frequency rate.

Parameters
rateThe frequency rate:
  • 72: 72 Hz
  • 90: 90 Hz
  • 120: 120 Hz

◆ GetSystemDisplayFrequency()

static float GetSystemDisplayFrequency ( )
static

Gets the system display frequency rate.

Returns
The system display frequency rate.

◆ SetLargeSpaceEnable()

static void SetLargeSpaceEnable ( bool  value)
static

Gets whether the current app supports large space.

Parameters
valueA bool value:
  • true: support
  • false: not support

◆ GetPredictedMainSensorStateNew()

static int GetPredictedMainSensorStateNew ( ref PxrSensorState2  sensorState,
ref int  sensorFrameIndex 
)
static

Gets the predicted status of the sensor.

Parameters
sensorStateSensor's coordinate:
  • pose: coordinate inside the app
  • globalPose: global coordinate
sensorFrameIndexSensor frame index.
Returns
The predicted status of the sensor.

◆ GetCpuUsages()

static float[] GetCpuUsages ( )
static

Gets the CPU utilization of the current device.

Returns
The CPU utilization of the current device.

◆ GetDeviceTemperatures()

static float[] GetDeviceTemperatures ( int  type,
int  source 
)
static

Gets device temperature in Celsius.

Parameters
typeThe requested type of device temperature:
  • 0: CPU temperature (DEVICE_TEMPERATURE_CPU)
  • 1: GPU temperature (DEVICE_TEMPERATURE_GPU)
  • 2: battery temperature (DEVICE_TEMPERATURE_BATTERY)
  • 3: surface temperature (DEVICE_TEMPERATURE_SKIN)
sourceThe requested source of device temperature:
  • 0: current temperature (TEMPERATURE_CURRENT)
  • 1: temperature threshold for throttling (TEMPERATURE_THROTTLING)
  • 2: temperature threshold for shutdown (TEMPERATURE_SHUTDOWN)
  • 3: temperature threshold for throttling (TEMPERATURE_THROTTLING_BELOW_VR_MIN). If the actual temperature is higher than the threshold, the lowest clock frequency for VR mode will not be met
Returns
An array of requested device temperatures in Celsius.

◆ Capture()

static void Capture ( )
static

Captures the current screen.

◆ Record()

static void Record ( )
static

Records the screen. Call this function again to stop recording.

◆ ControlSetAutoConnectWIFIWithErrorCodeCallback()

static void ControlSetAutoConnectWIFIWithErrorCodeCallback ( String  ssid,
String  pwd,
int  ext,
Action< int >  callback 
)
static

Connects the device to a specified Wi-Fi.

Parameters
ssidWi-Fi name.
pwdWi-Fi password.
extReserved parameter, pass 0 by default.
callbackThe callback for indicating whether the Wi-Fi connection is successful:
  • 0: connected
  • 1: password error
  • 2: unknown error

◆ AppKeepAlive()

static void AppKeepAlive ( String  appPackageName,
bool  keepAlive,
int  ext 
)
static

Keeps an app active. In other words, improves the priority of an app, thereby making the system not to force quit the app.

Parameters
appPackageNameApp package name.
keepAliveWhether to keep the app active (i.e., whether to enhance the priority of the app):
  • true: yes
  • false: no
extReserved parameter, pass 0 by default.

◆ TimingStartup()

static void TimingStartup ( int  year,
int  month,
int  day,
int  hour,
int  minute,
bool  open 
)
static

Schedules automatic startup for the device.
Note: Supported by Neo 3 series only.

Parameters
yearYear, for example, 2022.
monthMonth, for example, 2.
dayDay, for example, 22.
hourHour, for example, 22.
minuteMinute, for example, 22.
openWhether to enable scheduled auto startup for the device:
  • true: enable
  • false: disable

◆ TimingShutdown()

static void TimingShutdown ( int  year,
int  month,
int  day,
int  hour,
int  minute,
bool  open 
)
static

Schedules automatic shutdown for the device.
Note: Supported by Neo 3 series only.

Parameters
yearYear, for example, 2022.
monthMonth, for example, 2.
dayDay, for example, 22.
hourHour, for example, 22.
minuteMinute, for example, 22.
openWhether to enable scheduled auto shutdown for the device:
  • true: enable
  • false: disable

◆ StartVrSettingsItem()

static void StartVrSettingsItem ( StartVRSettingsEnum  settingsEnum,
bool  showOtherItem,
int  ext 
)
static

Displays a specified settings screen.
Note: Supported by Neo 3 series only.

Parameters
settingsEnumThe enumerations of settings screen:
  • START_VR_SETTINGS_ITEM_WIFI: the Wi-Fi settings screen
  • START_VR_SETTINGS_ITEM_BLUETOOTH: the bluetooth settings screen
  • START_VR_SETTINGS_ITEM_CONTROLLER: the controller settings screen
  • START_VR_SETTINGS_ITEM_LAB: the lab settings screen
  • START_VR_SETTINGS_ITEM_BRIGHTNESS: the brightness settings screen
  • START_VR_SETTINGS_ITEM_GENERAL): the general settings screen
  • START_VR_SETTINGS_ITEM_NOTIFICATION: the notification settings screen
showOtherItemWhether to display the selected settings screen:
  • true: display
  • false: hide
extReserved parameter, pass 0 by default.

The documentation for this class was generated from the following file: