Skip to main content

QWR Device Manager

The QWRDeviceManager provides comprehensive device management APIs for QWR VRone. Edu devices, enabling developers to control various aspects of the VR headset's functionality.

tip

For a full sample project demonstrating these APIs in use, see the VRoneEdu_Unity_DeviceManager repository.

Supported Devices​

The QWRDeviceManager APIs are applied to the following devices:

  • QWR VRone. Edu

API Overview​

The QWRDeviceManager is organized into several functional categories:


Power Management​

AndroidShutDown​

Shuts down the Android system.

public static void AndroidShutDown()

AndroidReboot​

Reboots the Android system.

public static void AndroidReboot()

AcquireWakeLock​

Acquires a wake lock to prevent the device from sleeping.

public static void AcquireWakeLock()

ReleaseWakeLock​

Releases the previously acquired wake lock.

public static void ReleaseWakeLock()

App Management​

GoToApp​

Launches a specific application by package name.

public static void GoToApp(string packageName)

Parameters:

  • packageName - The package name of the application to launch

CloseApp​

Closes a specific application by package name.

public static void CloseApp(string packageName)

Parameters:

  • packageName - The package name of the application to close

StartAppWithExtra​

Starts an application with extra data.

public static void StartAppWithExtra(string packageName, string action, string data)

Parameters:

  • packageName - The package name of the application
  • action - The action to perform
  • data - Extra data to pass to the application

StartAppWithAction​

Starts an application with a specific action.

public static void StartAppWithAction(string packageName, string action)

Parameters:

  • packageName - The package name of the application
  • action - The action to perform

InstallApk​

Installs an APK file.

public static void InstallApk(string apkPath)

Parameters:

  • apkPath - The path to the APK file to install

UninstallApk​

Uninstalls an application by package name.

public static void UninstallApk(string packageName)

Parameters:

  • packageName - The package name of the application to uninstall

GetInstalledAppList​

Retrieves a list of all installed applications.

public static List<string> GetInstalledAppList()

Returns:

  • List<string> - List of package names of installed applications

GetAppNameByPackageName​

Gets the display name of an application by its package name.

public static string GetAppNameByPackageName(string packageName)

Parameters:

  • packageName - The package name of the application

Returns:

  • string - The display name of the application

GetAppIconByPackageName​

Gets the icon of an application by its package name.

public static Texture2D GetAppIconByPackageName(string packageName)

Parameters:

  • packageName - The package name of the application

Returns:

  • Texture2D - The icon of the application

ShowControllerBindPage​

Shows the controller binding page.

public static void ShowControllerBindPage()

Home App Management​

SetHomeKeyApp​

Sets a specific application as the home key app.

public static void SetHomeKeyApp(string packageName)

Parameters:

  • packageName - The package name of the application to set as home app

RestoreHomeKeyApp​

Restores the default home key app.

public static void RestoreHomeKeyApp()

SetNewLauncher​

Sets a new launcher application (only available on VRonePro device).

public static void SetNewLauncher(string packageName)

Parameters:

  • packageName - The package name of the new launcher

RestoreQwrLauncher​

Restores the default QWR launcher (only available on VRonePro device).

public static void RestoreQwrLauncher()

System Key Management​

BlockPowerKey​

Blocks the power key functionality.

public static void BlockPowerKey()

AllowPowerKey​

Allows the power key functionality.

public static void AllowPowerKey()

BlockBackKey​

Blocks the back key functionality.

public static void BlockBackKey()

AllowBackKey​

Allows the back key functionality.

public static void AllowBackKey()

BlockHomeKey​

Blocks the home key functionality.

public static void BlockHomeKey()

AllowHomeKey​

Allows the home key functionality.

public static void AllowHomeKey()

BlockScreenOff​

Blocks the screen from turning off.

public static void BlockScreenOff()

AllowScreenOff​

Allows the screen to turn off.

public static void AllowScreenOff()

BlockVolumeKey​

Blocks the volume key functionality.

public static void BlockVolumeKey()

AllowVolumeKey​

Allows the volume key functionality.

public static void AllowVolumeKey()

ClearOrSetAllBlockState​

Clears or sets all block states.

public static void ClearOrSetAllBlockState(bool blockState)

Parameters:

  • blockState - True to block all keys, false to allow all keys

Controller Key Management​

BlockControllerHomeKey​

Blocks the controller home key functionality.

public static void BlockControllerHomeKey()

AllowControllerHomeKey​

Allows the controller home key functionality.

public static void AllowControllerHomeKey()

BlockControllerBackKey​

Blocks the controller back key functionality.

public static void BlockControllerBackKey()

AllowControllerBackKey​

Allows the controller back key functionality.

public static void AllowControllerBackKey()

BlockControllerDPADKey​

Blocks the controller D-pad key functionality.

public static void BlockControllerDPADKey()

AllowControllerDPADKey​

Allows the controller D-pad key functionality.

public static void AllowControllerDPADKey()

BlockControllerTriggerKey​

Blocks the controller trigger key functionality.

public static void BlockControllerTriggerKey()

AllowControllerTriggerKey​

Allows the controller trigger key functionality.

public static void AllowControllerTriggerKey()

ClearOrSetAllControllerState​

Clears or sets all controller block states.

public static void ClearOrSetAllControllerState(bool blockState)

Parameters:

  • blockState - True to block all controller keys, false to allow all controller keys

EnableDoubleClickBackKey​

Enables double-click functionality for the back key.

public static void EnableDoubleClickBackKey()

DisableDoubleClickBackKey​

Disables double-click functionality for the back key.

public static void DisableDoubleClickBackKey()

EnableDoubleClickHomeKey​

Enables double-click functionality for the home key.

public static void EnableDoubleClickHomeKey()

DisableDoubleClickHomeKey​

Disables double-click functionality for the home key.

public static void DisableDoubleClickHomeKey()

RegisterDoubleClickHomeKeyCallback​

Registers a callback for double-click home key events.

public static void RegisterDoubleClickHomeKeyCallback(Action callback)

Parameters:

  • callback - The callback function to register

System Sleep Management​

BlockSystemSleep​

Prevents the system from entering sleep mode.

public static void BlockSystemSleep()

AllowSystemSleep​

Allows the system to enter sleep mode.

public static void AllowSystemSleep()

Battery Management​

GetHMDBatteryLevel​

Gets the current battery level of the HMD.

public static int GetHMDBatteryLevel()

Returns:

  • int - Battery level percentage (0-100)

RegisterBatteryCallback​

Registers a callback for battery level changes.

public static void RegisterBatteryCallback(Action<int> callback)

Parameters:

  • callback - Callback function that receives battery level as parameter

WiFi Management​

OpenWifiSettings​

Opens the WiFi settings page.

public static void OpenWifiSettings()

IsNetworkAvailable​

Checks if network connectivity is available.

public static bool IsNetworkAvailable()

Returns:

  • bool - True if network is available, false otherwise

GetWifiStrength​

Gets the current WiFi signal strength.

public static int GetWifiStrength()

Returns:

  • int - WiFi signal strength in dBm

RegisterWifiReceiver​

Registers a WiFi state change receiver.

public static void RegisterWifiReceiver(Action<bool> callback)

Parameters:

  • callback - Callback function for WiFi state changes

UnRegisterConnectionChangeReceiver​

Unregisters the connection change receiver.

public static void UnRegisterConnectionChangeReceiver()

SetWifiEnabled​

Enables or disables WiFi.

public static void SetWifiEnabled(bool enabled)

Parameters:

  • enabled - True to enable WiFi, false to disable

GetWifiState​

Gets the current WiFi state.

public static int GetWifiState()

Returns:

  • int - WiFi state code

IsWifiEnable​

Checks if WiFi is enabled.

public static bool IsWifiEnable()

Returns:

  • bool - True if WiFi is enabled, false otherwise

GetConfiguredWifi​

Gets the list of configured WiFi networks.

public static List<string> GetConfiguredWifi()

Returns:

  • List<string> - List of configured WiFi network SSIDs

GetConnectedWifiSSID​

Gets the SSID of the currently connected WiFi network.

public static string GetConnectedWifiSSID()

Returns:

  • string - SSID of the connected WiFi network

StartScanWifi​

Starts scanning for available WiFi networks.

public static void StartScanWifi()

GetScanResult​

Gets the results of the WiFi scan.

public static List<WifiNetwork> GetScanResult()

Returns:

  • List<WifiNetwork> - List of available WiFi networks

GetMacAddress​

Gets the MAC address of the WiFi adapter.

public static string GetMacAddress()

Returns:

  • string - MAC address of the WiFi adapter

ConnectWifi​

Connects to a WiFi network.

public static void ConnectWifi(string ssid, string password)

Parameters:

  • ssid - The SSID of the WiFi network
  • password - The password for the WiFi network

ConnectStaticIpWifi​

Connects to a WiFi network with static IP configuration.

public static void ConnectStaticIpWifi(string ssid, string password, string ip, string gateway, string dns)

Parameters:

  • ssid - The SSID of the WiFi network
  • password - The password for the WiFi network
  • ip - Static IP address
  • gateway - Gateway address
  • dns - DNS server address

DisconnectWifi​

Disconnects from the current WiFi network.

public static void DisconnectWifi()

RemoveWifiBySsid​

Removes a WiFi network configuration by SSID.

public static void RemoveWifiBySsid(string ssid)

Parameters:

  • ssid - The SSID of the WiFi network to remove

Bluetooth Management​

OpenAndroidBluetoothSetting​

Opens the Android Bluetooth settings page.

public static void OpenAndroidBluetoothSetting()

RegisterBluetoothCallback​

Registers a Bluetooth state change callback.

public static void RegisterBluetoothCallback(Action<bool> callback)

Parameters:

  • callback - Callback function for Bluetooth state changes

IsBluetoothEnabled​

Checks if Bluetooth is enabled.

public static bool IsBluetoothEnabled()

Returns:

  • bool - True if Bluetooth is enabled, false otherwise

UnregisterBluetoothCallback​

Unregisters the Bluetooth callback.

public static void UnregisterBluetoothCallback()

GetConnectedDeviceNameList​

Gets a list of connected Bluetooth device names.

public static List<string> GetConnectedDeviceNameList()

Returns:

  • List<string> - List of connected Bluetooth device names

SetBluetoothEnabled​

Enables or disables Bluetooth.

public static void SetBluetoothEnabled(bool enabled)

Parameters:

  • enabled - True to enable Bluetooth, false to disable

GetBluetoothState​

Gets the current Bluetooth state.

public static int GetBluetoothState()

Returns:

  • int - Bluetooth state code

GetLocalName​

Gets the local Bluetooth device name.

public static string GetLocalName()

Returns:

  • string - Local Bluetooth device name

SetLocalName​

Sets the local Bluetooth device name.

public static void SetLocalName(string name)

Parameters:

  • name - The new local Bluetooth device name

StartDiscovery​

Starts Bluetooth device discovery.

public static void StartDiscovery()

IsDiscovering​

Checks if Bluetooth discovery is in progress.

public static bool IsDiscovering()

Returns:

  • bool - True if discovery is in progress, false otherwise

CancelDiscovery​

Cancels Bluetooth device discovery.

public static void CancelDiscovery()

GetBluetoothBondedDevices​

Gets a list of bonded Bluetooth devices.

public static List<BluetoothDevice> GetBluetoothBondedDevices()

Returns:

  • List<BluetoothDevice> - List of bonded Bluetooth devices

ConnectBluetoothDevice​

Connects to a Bluetooth device.

public static void ConnectBluetoothDevice(string deviceAddress)

Parameters:

  • deviceAddress - The MAC address of the Bluetooth device

RemoveBluetoothDevice​

Removes a Bluetooth device from bonded devices.

public static void RemoveBluetoothDevice(string deviceAddress)

Parameters:

  • deviceAddress - The MAC address of the Bluetooth device to remove

System Info Query​

GetProductModel​

Gets the product model of the device.

public static string GetProductModel()

Returns:

  • string - Product model name

GetLinuxVersion​

Gets the Linux kernel version.

public static string GetLinuxVersion()

Returns:

  • string - Linux kernel version

GetAndroidVersion​

Gets the Android version.

public static string GetAndroidVersion()

Returns:

  • string - Android version

GetBuildNumber​

Gets the build number.

public static string GetBuildNumber()

Returns:

  • string - Build number

GetSerialNo​

Gets the device serial number.

public static string GetSerialNo()

Returns:

  • string - Device serial number

FOTA Update Management​

QueryFotaUpdate​

Queries for available FOTA updates.

public static void QueryFotaUpdate()

RegisterFotaUpdate​

Registers a callback for FOTA update events.

public static void RegisterFotaUpdate(Action<FotaUpdateInfo> callback)

Parameters:

  • callback - Callback function for FOTA update events

Language Management​

SetLanguage​

Sets the system language.

public static void SetLanguage(string languageCode)

Parameters:

  • languageCode - The language code (e.g., "en", "zh", "es")

GetCurrentSystemLanguage​

Gets the current system language.

public static string GetCurrentSystemLanguage()

Returns:

  • string - Current system language code

GetCurrentSystemCountry​

Gets the current system country.

public static string GetCurrentSystemCountry()

Returns:

  • string - Current system country code

GetSupportLanguageList​

Gets the list of supported languages.

public static List<string> GetSupportLanguageList()

Returns:

  • List<string> - List of supported language codes

GetCountriesByLanguage​

Gets the list of countries for a specific language.

public static List<string> GetCountriesByLanguage(string languageCode)

Parameters:

  • languageCode - The language code

Returns:

  • List<string> - List of country codes for the language

MediaPlayerManager​

PlayVideo​

Plays a video file.

public static void PlayVideo(string videoPath)

Parameters:

  • videoPath - Path to the video file

PauseVideo​

Pauses the currently playing video.

public static void PauseVideo()

StopPlay​

Stops the currently playing video.

public static void StopPlay()

SwitchPlayMode​

Switches the play mode (e.g., fullscreen, windowed).

public static void SwitchPlayMode(PlayMode mode)

Parameters:

  • mode - The play mode to switch to

SeekPlayer​

Seeks to a specific position in the video.

public static void SeekPlayer(float position)

Parameters:

  • position - Position in seconds

SetVolume​

Sets the media player volume.

public static void SetVolume(float volume)

Parameters:

  • volume - Volume level (0.0 to 1.0)

BlockTouch​

Blocks or allows touch input on the media player.

public static void BlockTouch(bool block)

Parameters:

  • block - True to block touch, false to allow

PopNotification​

Shows a notification.

public static void PopNotification(string message)

Parameters:

  • message - The notification message

SetCurrentPackageName​

Sets the current package name for the media player.

public static void SetCurrentPackageName(string packageName)

Parameters:

  • packageName - The package name

RegisterMediaPlayerStatusCallback​

Registers a callback for media player status changes.

public static void RegisterMediaPlayerStatusCallback(Action<MediaPlayerStatus> callback)

Parameters:

  • callback - Callback function for media player status changes

QWRSettingsManager​

OpenApplicationDetail​

Opens the application details page.

public static void OpenApplicationDetail(string packageName)

Parameters:

  • packageName - The package name of the application

OpenDateSettings​

Opens the date and time settings.

public static void OpenDateSettings()

OpenDeviceInfoSettings​

Opens the device information settings.

public static void OpenDeviceInfoSettings()

OpenLocaleSettings​

Opens the locale settings.

public static void OpenLocaleSettings()

OpenSoundSettings​

Opens the sound settings.

public static void OpenSoundSettings()

OpenVPNSettings​

Opens the VPN settings.

public static void OpenVPNSettings()

OpenDisplaySettings​

Opens the display settings.

public static void OpenDisplaySettings()

For more detailed information about specific APIs, refer to the QWR SDK documentation or contact QWR support.