12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012 |
- /*******************************************************************************
- Copyright © 2015-2022 PICO Technology Co., Ltd.All rights reserved.
- NOTICE:All information contained herein is, and remains the property of
- PICO Technology Co., Ltd. The intellectual and technical concepts
- contained herein are proprietary to PICO Technology Co., Ltd. and may be
- covered by patents, patents in process, and are protected by trade secret or
- copyright law. Dissemination of this information or reproduction of this
- material is strictly forbidden unless prior written permission is obtained from
- PICO Technology Co., Ltd.
- *******************************************************************************/
- using System;
- using System.Collections.Generic;
- using UnityEngine.XR;
- namespace Unity.XR.PICO.TOBSupport
- {
- /**
- * Enterprise APIs are only supported by enterprise devices, including PICO Neo2, Neo2 Eye, Neo3 Pro、Neo3 Pro Eye, G2 4K/4K E/4K Plus (system version 4.0.3 or later), and PICO 4 Enterprise.
- * Do not use them on consumer devices.
- */
- public class PXR_Enterprise
- {
- /// <summary>
- /// Initializes the enterprise service for a specified object. Must be called before calling other enterprise APIs.
- /// </summary>
- /// <returns>Whether the enterprise service has been initialized:
- /// * `true`: success
- /// * `false`: failure
- /// @note OpenXR does not support the returns. The returns belong to EasyAR initialization.
- public static bool InitEnterpriseService()
- {
- PXR_EnterpriseTools.Instance.StartUp();
- bool result = PXR_EnterprisePlugin.UPxr_InitEnterpriseService();
- return result;
- }
- /// <summary>
- /// Binds the enterprise service. Must be called before calling other system related functions.
- /// </summary>
- /// <param name="callback">
- /// Service-binding result callback that allows for bool values:
- /// * `true`: success
- /// * `false`: failure
- /// If no callback is specified, the parameter will default to null.
- /// </param>
- public static void BindEnterpriseService(Action<bool> callback=null)
- {
- PXR_EnterprisePlugin.UPxr_BindEnterpriseService(callback);
- }
- /// <summary>
- /// Unbinds the enterprise service.
- /// </summary>
- public static void UnBindEnterpriseService()
- {
- PXR_EnterprisePlugin.UPxr_UnBindEnterpriseService();
- }
-
- /// <summary>
- /// Gets the specified type of device information.
- /// </summary>
- /// <param name="type">The target information type. Enumerations:
- /// * `ELECTRIC_QUANTITY`: battery
- /// * `PUI_VERSION`: system 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
- /// </param>
- /// <returns>The specified type of device information. For `CHARGING_STATUS`, an int value will be returned: `2`-charging; `3`-not charging.</returns>
- public static string StateGetDeviceInfo(SystemInfoEnum type)
- {
- return PXR_EnterprisePlugin.UPxr_StateGetDeviceInfo(type);
- }
- /// <summary>
- /// Shuts down or reboots the device.
- /// @note This is a protected API. You need to add `<meta-data android:name="pico_advance_interface" android:value="0"/>`
- /// to the app's AndroidManifest.xml file for calling this API, after which the app is unable to be published on the PICO Store.
- /// </summary>
- /// <param name="deviceControl">Device action. Enumerations:
- /// * `DEVICE_CONTROL_REBOOT`
- /// * `DEVICE_CONTROL_SHUTDOWN`
- /// </param>
- /// <param name="callback">Callback:
- /// * `1`: failed to shut down or reboot the device
- /// * `2`: no permission to perform this operation
- /// </param>
- public static void ControlSetDeviceAction(DeviceControlEnum deviceControl, Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_ControlSetDeviceAction(deviceControl, callback);
- }
- /// <summary>
- /// Installs or uninstalls app silently.
- /// @note This is a protected API. You need to add `<meta-data android:name="pico_advance_interface" android:value="0"/>`
- /// to the app's AndroidManifest.xml file for calling this API, after which the app is unable to be published on the PICO Store.
- /// </summary>
- /// <param name="packageControl">The action. Enumerations:
- /// * `PACKAGE_SILENCE_INSTALL`: silent installation
- /// * `PACKAGE_SILENCE_UNINSTALL`: silent uninstallation
- /// </param>
- /// <param name="path">The path to the app package for silent installation or the name of the app package for silent uninstallation.</param>
- /// <param name="callback">Callback:
- /// * `0`: success
- /// * `1`: failure
- /// * `2`: no permission to perform this operation
- /// </param>
- public static void ControlAPPManager(PackageControlEnum packageControl, string path, Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_ControlAPPManager(packageControl, path, callback);
- }
- /// <summary>
- /// Sets a Wi-Fi that the device is automatically connected to.
- /// </summary>
- /// <param name="ssid">Wi-Fi name.</param>
- /// <param name="pwd">Wi-Fi password.</param>
- /// <param name="callback">Callback:
- /// * `true`: connected
- /// * `false`: failed to connect
- /// </param>
- public static void ControlSetAutoConnectWIFI(string ssid, string pwd, Action<bool> callback)
- {
- PXR_EnterprisePlugin.UPxr_ControlSetAutoConnectWIFI(ssid, pwd, callback);
- }
- /// <summary>
- /// Removes the Wi-Fi that the device is automatically connected to.
- /// </summary>
- /// <param name="callback">Callback:
- /// * `true`: removed
- /// * `false`: failed to remove
- /// </param>
- public static void ControlClearAutoConnectWIFI(Action<bool> callback)
- {
- PXR_EnterprisePlugin.UPxr_ControlClearAutoConnectWIFI(callback);
- }
- /// <summary>
- /// Sets the Home button event.
- /// </summary>
- /// <param name="eventEnum">Target event. Enumerations:
- /// * `SINGLE_CLICK`: single-click
- /// * `DOUBLE_CLICK`: double-click
- /// * `LONG_PRESS`: long press
- /// * `SINGLE_CLICK_RIGHT_CTL`: single-click on the right controller's Home button
- /// * `DOUBLE_CLICK_RIGHT_CTL`: double-click on the right controller's Home button
- /// * `LONG_PRESS_RIGHT_CTL`: long press on the right controller's Home button
- /// * `SINGLE_CLICK_LEFT_CTL`: single-click on the left controller's Home button
- /// * `DOUBLE_CLICK_LEFT_CTL`: double-click on the left controller's Home button
- /// * `LONG_PRESS_LEFT_CTL`: long press on the left controller's Home button
- /// * `SINGLE_CLICK_HMD`: single-click on the HMD's Home button
- /// * `DOUBLE_CLICK_HMD`: double-click on the HMD's Home button
- /// * `LONG_PRESS_HMD`: long press on the HMD's Home button
- /// </param>
- /// <param name="function">The function of the event. Enumerations:
- /// * `VALUE_HOME_GO_TO_SETTING`: go to Settings
- /// * `VALUE_HOME_BACK`: back (only supported by PICO G2 4K)
- /// * `VALUE_HOME_RECENTER`: recenter the screen
- /// * `VALUE_HOME_OPEN_APP`: open a specified app
- /// * `VALUE_HOME_DISABLE`: disable the Home button
- /// * `VALUE_HOME_GO_TO_HOME`: open the launcher
- /// * `VALUE_HOME_SEND_BROADCAST`: send Home-button-click broadcast
- /// * `VALUE_HOME_CLEAN_MEMORY`: clear background apps
- /// * `VALUE_HOME_QUICK_SETTING`: enable quick settings
- /// * `VALUE_HOME_SCREEN_CAP`: enable screen capture
- /// * `VALUE_HOME_SCREEN_RECORD`: enable screen recording
- /// </param>
- /// <param name="callback">Callback:
- /// * `true`: success
- /// * `false`: failure
- /// </param>
- public static void PropertySetHomeKey(HomeEventEnum eventEnum, HomeFunctionEnum function, Action<bool> callback)
- {
- PXR_EnterprisePlugin.UPxr_PropertySetHomeKey(eventEnum, function, callback);
- }
- /// <summary>
- /// Sets extended settings for the Home button.
- /// </summary>
- /// <param name="eventEnum">Target event. Enumerations:
- /// * `SINGLE_CLICK_RIGHT_CTL`: single-click on the right controller's Home button
- /// * `DOUBLE_CLICK_RIGHT_CTL`: double-click on the right controller's Home button
- /// * `LONG_PRESS_RIGHT_CTL`: long press on the right controller's Home button
- /// * `SINGLE_CLICK_LEFT_CTL`: single-click on the left controller's Home button
- /// * `DOUBLE_CLICK_LEFT_CTL`: double-click on the left controller's Home button
- /// * `LONG_PRESS_LEFT_CTL`: long press on the left controller's Home button
- /// * `SINGLE_CLICK_HMD`: single-click on the HMD's Home button
- /// * `DOUBLE_CLICK_HMD`: double-click on the HMD's Home button
- /// * `LONG_PRESS_HMD`: long press on the HMD's Home button
- /// </param>
- /// <param name="function">The function of the event. Enumerations:
- /// * `VALUE_HOME_GO_TO_SETTING`: go to Settings
- /// * `VALUE_HOME_BACK`: back (only supported by PICO G2 4K)
- /// * `VALUE_HOME_RECENTER`: recenter the screen
- /// * `VALUE_HOME_OPEN_APP`: open a specified app
- /// * `VALUE_HOME_DISABLE`: disable the Home button
- /// * `VALUE_HOME_GO_TO_HOME`: open the launcher
- /// * `VALUE_HOME_SEND_BROADCAST`: send Home-key-click broadcast
- /// * `VALUE_HOME_CLEAN_MEMORY`: clear background apps
- /// * `VALUE_HOME_QUICK_SETTING`: enable quick settings
- /// * `VALUE_HOME_SCREEN_CAP`: enable screen capture
- /// * `VALUE_HOME_SCREEN_RECORD`: enable screen recording
- /// </param>
- /// <param name="timesetup">The interval of key pressing is set only if there is the double click event or long pressing event. When shortly pressing the Home button, pass `0`.</param>
- /// <param name="pkg">Pass `null`.</param>
- /// <param name="className">Pass `null`.</param>
- /// <param name="callback">Callback:
- /// * `true`: set
- /// * `false`: failed to set
- /// </param>
- public static void PropertySetHomeKeyAll(HomeEventEnum eventEnum, HomeFunctionEnum function, int timesetup, string pkg, string className, Action<bool> callback)
- {
- PXR_EnterprisePlugin.UPxr_PropertySetHomeKeyAll(eventEnum, function, timesetup, pkg, className, callback);
- }
- /// <summary>
- /// Sets the Power button's event.
- /// </summary>
- /// <param name="isSingleTap">Whether it is a single click event:
- /// * `true`: single-click event
- /// * `false`: long-press event
- /// </param>
- /// <param name="enable">Enable or disable the Power button:
- /// * `true`: enable
- /// * `false`: disable
- /// </param>
- /// <param name="callback">Callback:
- /// * `0`: set
- /// * `1`: failed to set
- /// </param>
- public static void PropertyDisablePowerKey(bool isSingleTap, bool enable, Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_PropertyDisablePowerKey(isSingleTap, enable, callback);
- }
- /// <summary>
- /// Sets the time the screen turns off when the device is not in use.
- /// </summary>
- /// <param name="timeEnum">Screen off timeout. Enumerations:
- /// * `Never`: never off
- /// * `THREE`: 3s (only supported by PICO G2 4K)
- /// * `TEN`: 10s (only supported by PICO G2 4K)
- /// * `THIRTY`: 30s
- /// * `SIXTY`: 60s
- /// * `THREE_HUNDRED`: 5 mins
- /// * `SIX_HUNDRED`: 10 mins
- /// </param>
- /// <param name="callback">Callback:
- /// * `0`: set
- /// * `1`: failed to set
- /// * `10`: the screen off timeout should not be longer than the system sleep timeout
- /// </param>
- public static void PropertySetScreenOffDelay(ScreenOffDelayTimeEnum timeEnum, Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_PropertySetScreenOffDelay(timeEnum, callback);
- }
- /// <summary>
- /// Sets the time the system sleeps when the device is not in use.
- /// </summary>
- /// <param name="timeEnum">System sleep timeout. Enumerations:
- /// * `Never`: never sleep
- /// * `FIFTEEN`: 15s (only supported by PICO G2 4K)
- /// * `THIRTY`: 30s (only supported by PICO G2 4K)
- /// * `SIXTY`: 60s (only supported by PICO G2 4K)
- /// * `THREE_HUNDRED`: 5 mins
- /// * `SIX_HUNDRED`: 10 mins
- /// * `ONE_THOUSAND_AND_EIGHT_HUNDRED`: 30 mins
- /// </param>
- public static void PropertySetSleepDelay(SleepDelayTimeEnum timeEnum)
- {
- PXR_EnterprisePlugin.UPxr_PropertySetSleepDelay(timeEnum);
- }
- /// <summary>
- /// Switches specified system function on/off.
- /// </summary>
- /// <param name="systemFunction">Function name. Enumerations:
- /// * `SFS_USB`: USB debugging
- /// * `SFS_AUTOSLEEP`: auto sleep
- /// * `SFS_SCREENON_CHARGING`: screen-on charging
- /// * `SFS_OTG_CHARGING`: OTG charging (supported by G2 devices)
- /// * `SFS_RETURN_MENU_IN_2DMODE`: display the Return icon on the 2D screen
- /// * `SFS_COMBINATION_KEY`: combination key
- /// * `SFS_CALIBRATION_WITH_POWER_ON`: calibration with power on
- /// * `SFS_SYSTEM_UPDATE`: system update (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_CAST_SERVICE`: phone casting service
- /// * `SFS_EYE_PROTECTION`: eye-protection mode
- /// * `SFS_SECURITY_ZONE_PERMANENTLY`: permanently disable the 6DoF play area (supported by PICO Neo2 devices)
- /// * `SFS_GLOBAL_CALIBRATION`: global calibration (supported by PICO G2 devices)
- /// * `SFS_Auto_Calibration`: auto calibration
- /// * `SFS_USB_BOOT`: USB plug-in boot
- /// * `SFS_VOLUME_UI`: global volume UI (need to restart the device to make the setting take effect)
- /// * `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_USB_FORCE_HOST`: set the Neo3 Pro/Pro Eye device as the host device
- /// * `SFS_SET_DEFAULT_SAFETY_ZONE`: set a default play area for PICO Neo3 and PICO 4 series devices
- /// * `SFS_ALLOW_RESET_BOUNDARY`: allow to reset customized boundary for PICO Neo3 series devices
- /// * `SFS_BOUNDARY_CONFIRMATION_SCREEN`: whether to display the boundary confirmation screen for PICO Neo3 and PICO 4 series devices
- /// * `SFS_LONG_PRESS_HOME_TO_RECENTER`: long press the Home button to recenter for PICO Neo3 and PICO 4 series devices
- /// * `SFS_POWER_CTRL_WIFI_ENABLE`: stay connected to the network when the device sleeps/turns off (supported by PICO Neo3 Pro with system version 4.8.0 or later and PICO 4 Enterprise with system version OTA-5.2.8 or later)
- /// * `SFS_WIFI_DISABLE`: disable Wi-Fi (supported by PICO Neo3 Pro with system version 4.8.0 or later and PICO 4 Enterprise with system version OTA-5.2.8 or later)
- /// * `SFS_SIX_DOF_SWITCH`: 6DoF position tracking for PICO Neo3 and PICO 4 series devices
- /// * `SFS_INVERSE_DISPERSION`: anti-dispersion (supported by PICO Neo3 Pro with system version 4.8.0 or later and PICO 4 Enterprise with system version OTA0-5.2.8 or later)
- /// * `SFS_LOGCAT`: system log switch (/data/logs) (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_PSENSOR`: PSensor switch (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SYSTEM_UPDATE_OTA`: OTA upgrade (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SYSTEM_UPDATE_APP`: app upgrade and update (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_WLAN_UI`: quickly set whether to show the WLAN button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_BOUNDARY_UI`: quickly set whether to show the boundary button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_BLUETOOTH_UI`: quickly set whether to show the bluetooth button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_CLEAN_TASK_UI`: quickly set whether to show the one-click clear button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_IPD_ADJUSTMENT_UI`: quickly set whether to show the IPD adjustment button (supported by PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_POWER_UI`: quickly set whether to show the power button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_EDIT_UI`: quickly set whether to show the edit button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_BASIC_SETTING_APP_LIBRARY_UI`: the button for customizing the app library (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_BASIC_SETTING_SHORTCUT_UI`: the button for customizing quick settings (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_LED_FLASHING_WHEN_SCREEN_OFF`: whether to keep the LED indicator light on when the device's screen is off and the battery is below 20% (supported by PICO G3 devices)
- /// * `SFS_BASIC_SETTING_CUSTOMIZE_SETTING_UI`: customize settings item to show or hide in basic settings
- /// * `SFS_BASIC_SETTING_SHOW_APP_QUIT_CONFIRM_DIALOG`: whether to show the app-quit dialog box when switching to a new app
- /// * `SFS_BASIC_SETTING_KILL_BACKGROUND_VR_APP`: whether to kill background VR apps (`1`: kill, and this is the default setting; `2`: do not kill)
- /// * `SFS_BASIC_SETTING_SHOW_CAST_NOTIFICATION`: whether to show a blue icon when casting the screen. The icon is displayed by default, and you can set the value to `0` to hide it.
- /// * `SFS_AUTOMATIC_IPD`: auto IPD switch (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.7.0 or later)
- /// * `SFS_QUICK_SEETHROUGH_MODE`: quick seethrough mode switch (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.7.0 or later)
- /// * `SFS_HIGN_REFERSH_MODE`: high refresh mode switch (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.7.0 or later)
- /// * `SFS_SEETHROUGH_APP_KEEP_RUNNING`: set whether to keep the app running under the seethrough mode (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_OUTDOOR_TRACKING_ENHANCEMENT`: enhance outdoor position tracking (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_AUTOIPD_AUTO_COMFIRM`: quick auto-IPD (supported by PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_LAUNCH_AUTOIPD_IF_GLASSES_WEARED`: set whether to launch auto-IPD after wearing the headset (supported by PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_GESTURE_RECOGNITION_HOME_ENABLE`: Home gesture switch (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_GESTURE_RECOGNITION_RESET_ENABLE`: enable/disable the Reset gesture (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_AUTO_COPY_FILES_FROM_USB_DEVICE`: automatically import OTG resources (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.8.0 or later)
- /// </param>
- /// <param name="switchEnum">Whether to switch the function on/off:
- /// * `S_ON`: switch on
- /// * `S_OFF`: switch off
- /// </param>
- public static void SwitchSystemFunction(SystemFunctionSwitchEnum systemFunction, SwitchEnum switchEnum)
- {
- PXR_EnterprisePlugin.UPxr_SwitchSystemFunction(systemFunction, switchEnum);
- }
- /// <summary>
- /// Sets the USB configuration mode.
- /// </summary>
- /// <param name="uSBConfigModeEnum">USB configuration mode. Enumerations:
- /// * `MTP`: MTP mode
- /// * `CHARGE`: charging mode
- /// </param>
- public static void SwitchSetUsbConfigurationOption(USBConfigModeEnum uSBConfigModeEnum)
- {
- PXR_EnterprisePlugin.UPxr_SwitchSetUsbConfigurationOption(uSBConfigModeEnum);
- }
- /// <summary>
- /// Sets the duration after which the controllers enter the pairing mode.
- /// @note Supported by PICO Neo3 Pro (system version 5.4.0 or later) and PICO 4 Enterprise (system version 5.2.8 or later)
- /// </summary>
- /// <param name="timeEnum">Duration enumerations:
- /// * `SIX`: 6 seconds
- /// * `FIFTEEN`: 15 seconds
- /// * `SIXTY`: 60 seconds
- /// * `ONE_HUNDRED_AND_TWENTY`: 120 seconds (2 minutes)
- /// * `SIX_HUNDRED`: 600 seconds (5 minutes)
- /// * `NEVER`: never enter the pairing mode
- /// </param>
- /// <param name="callback">Returns the result:
- /// * `0`: failure
- /// * `1`: success
- /// </param>
- public static void SetControllerPairTime(ControllerPairTimeEnum timeEnum, Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_SetControllerPairTime(timeEnum, callback);
- }
- /// <summary>
- /// Gets the duration after which the controllers enter the pairing mode.
- /// @note Supported by PICO Neo3 Pro (system version 5.4.0 or later) and PICO 4 Enterprise (system version 5.2.8 or later)
- /// </summary>
- /// <param name="callback">Returns a duration enumeration from the following:
- /// * `SIX`: 6 seconds
- /// * `FIFTEEN`: 15 seconds
- /// * `SIXTY`: 60 seconds
- /// * `ONE_HUNDRED_AND_TWENTY`: 120 seconds (2 minutes)
- /// * `SIX_HUNDRED`: 600 seconds (5 minutes)
- /// * `NEVER`: never enter the pairing mode
- /// </param>
- public static void GetControllerPairTime(Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_GetControllerPairTime(callback);
- }
- /// <summary>
- /// Turns the screen on.
- /// @note This is a protected API. You need to add `<meta-data android:name="pico_advance_interface" android:value="0"/>`
- /// to the app's AndroidManifest.xml file for calling this API, after which the app is unable to be published on the PICO Store.
- /// </summary>
- public static void ScreenOn()
- {
- PXR_EnterprisePlugin.UPxr_ScreenOn();
- }
- /// <summary>
- /// Turns the screen off.
- /// @note This is a protected API. You need to add `<meta-data android:name="pico_advance_interface" android:value="0"/>`
- /// to the app's AndroidManifest.xml file for calling this API, after which the app is unable to be published on the PICO Store.
- /// </summary>
- public static void ScreenOff()
- {
- PXR_EnterprisePlugin.UPxr_ScreenOff();
- }
- /// <summary>
- /// Acquires the wake lock.
- /// </summary>
- public static void AcquireWakeLock()
- {
- PXR_EnterprisePlugin.UPxr_AcquireWakeLock();
- }
- /// <summary>
- /// Releases the wake lock.
- /// </summary>
- public static void ReleaseWakeLock()
- {
- PXR_EnterprisePlugin.UPxr_ReleaseWakeLock();
- }
- /// <summary>
- /// Enables the Confirm button.
- /// </summary>
- public static void EnableEnterKey()
- {
- PXR_EnterprisePlugin.UPxr_EnableEnterKey();
- }
- /// <summary>
- /// Disables the Confirm button.
- /// </summary>
- public static void DisableEnterKey()
- {
- PXR_EnterprisePlugin.UPxr_DisableEnterKey();
- }
- /// <summary>
- /// Enables the Volume button.
- /// </summary>
- public static void EnableVolumeKey()
- {
- PXR_EnterprisePlugin.UPxr_EnableVolumeKey();
- }
- /// <summary>
- /// Disables the Volume button.
- /// </summary>
- public static void DisableVolumeKey()
- {
- PXR_EnterprisePlugin.UPxr_DisableVolumeKey();
- }
- /// <summary>
- /// Enables the Back button.
- /// </summary>
- public static void EnableBackKey()
- {
- PXR_EnterprisePlugin.UPxr_EnableBackKey();
- }
- /// <summary>
- /// Disables the Back button.
- /// </summary>
- public static void DisableBackKey()
- {
- PXR_EnterprisePlugin.UPxr_DisableBackKey();
- }
- /// <summary>
- /// Resets all buttons to default configuration.
- /// </summary>
- /// <param name="callback">Whether all keys have been successfully reset to default configuration:
- /// * `true`: reset
- /// * `false`: failed to reset
- /// </param>
- public static void ResetAllKeyToDefault(Action<bool> callback)
- {
- PXR_EnterprisePlugin.UPxr_ResetAllKeyToDefault(callback);
- }
- /// <summary>
- /// Sets an app as the launcher app. Need to restart the device to make the setting work.
- /// </summary>
- /// <param name="switchEnum">(deprecated)</param>
- /// <param name="packageName">The app's package name.</param>
- public static void SetAPPAsHome(SwitchEnum switchEnum, string packageName)
- {
- PXR_EnterprisePlugin.UPxr_SetAPPAsHome(switchEnum, packageName);
- }
- /// <summary>
- /// Force quits app(s) by passing app PID or package name.
- /// @note This is a protected API. You need to add `<meta-data android:name="pico_advance_interface" android:value="0"/>`
- /// to the app's AndroidManifest.xml file for calling this API, after which the app is unable to be published on the PICO Store.
- /// </summary>
- /// <param name="pids">An array of app PID(s).</param>
- /// <param name="packageNames">An array of package name(s).</param>
- public static void KillAppsByPidOrPackageName(int[] pids, string[] packageNames)
- {
- PXR_EnterprisePlugin.UPxr_KillAppsByPidOrPackageName(pids, packageNames);
- }
- /// <summary>
- /// Force quits background app(s) expect those in the allowlist.
- /// @note This is a protected API. You need to add `<meta-data android:name="pico_advance_interface" android:value="0"/>`
- /// to the app's AndroidManifest.xml file for calling this API, after which the app is unable to be published on the PICO Store.
- /// </summary>
- /// <param name="packageNames">An array of package name(s) to be added to the allowlist. The corresponding app(s) in the allowlist will not be force quit.</param>
- public static void KillBackgroundAppsWithWhiteList(string[] packageNames)
- {
- PXR_EnterprisePlugin.UPxr_KillBackgroundAppsWithWhiteList(packageNames);
- }
- /// <summary>
- /// Freezes the screen to the front. The screen will turn around with the HMD.
- /// @note Supported by G2 4K and Neo2 devices.
- /// </summary>
- /// <param name="freeze">Whether to freeze the screen:
- /// * `true`: freeze
- /// * `false`: stop freezing
- /// </param>
- public static void FreezeScreen(bool freeze)
- {
- PXR_EnterprisePlugin.UPxr_FreezeScreen(freeze);
- }
- /// <summary>
- /// Turns on the screencast function.
- /// </summary>
- public static void OpenMiracast()
- {
- PXR_EnterprisePlugin.UPxr_OpenMiracast();
- }
- /// <summary>
- /// Gets the status of the screencast function.
- /// </summary>
- /// <returns>The status of the screencast function:
- /// * `true`: on
- /// * `false`: off
- /// </returns>
- public static bool IsMiracastOn()
- {
- return PXR_EnterprisePlugin.UPxr_IsMiracastOn();
- }
- /// <summary>
- /// Turns off the screencast function.
- /// </summary>
- public static void CloseMiracast()
- {
- PXR_EnterprisePlugin.UPxr_CloseMiracast();
- }
- /// <summary>
- /// Starts looking for devices that can be used for screen casting.
- /// </summary>
- public static void StartScan()
- {
- PXR_EnterprisePlugin.UPxr_StartScan();
- }
- /// <summary>
- /// Stops looking for devices that can be used for screen casting.
- /// </summary>
- public static void StopScan()
- {
- PXR_EnterprisePlugin.UPxr_StopScan();
- }
- /// <summary>
- /// Casts the screen to the specified device.
- /// </summary>
- /// <param name="modelJson">A modelJson structure containing the following fields:
- /// * `deviceAddress`
- /// * `deviceName`
- /// * `isAvailable` (`true`-device available; `false`-device not available)
- /// </param>
- public static void ConnectWifiDisplay(string modelJson)
- {
- PXR_EnterprisePlugin.UPxr_ConnectWifiDisplay(modelJson);
- }
- /// <summary>
- /// Stops casting the screen to the current device.
- /// </summary>
- public static void DisConnectWifiDisplay()
- {
- PXR_EnterprisePlugin.UPxr_DisConnectWifiDisplay();
- }
- /// <summary>
- /// Forgets the device that have been connected for screencast.
- /// </summary>
- /// <param name="address">Device address.</param>
- public static void ForgetWifiDisplay(string address)
- {
- PXR_EnterprisePlugin.UPxr_ForgetWifiDisplay(address);
- }
- /// <summary>
- /// Renames the device connected for screencast. The name is only for local storage.
- /// </summary>
- /// <param name="address">The MAC address of the device.</param>
- /// <param name="newName">The new device name.</param>
- public static void RenameWifiDisplay(string address, string newName)
- {
- PXR_EnterprisePlugin.UPxr_RenameWifiDisplay(address, newName);
- }
- /// <summary>
- /// Sets the callback for the scanning result, which returns `List<PBS_WifiDisplayModel>` that contains the devices previously connected for screencast and the devices currently found for screencast.
- /// </summary>
- /// <param name="models">
- /// Returns `List<WifiDisplayModel>` that contains the currently scanned device.
- /// </param>
- public static void SetWDModelsCallback(Action<List<WifiDisplayModel>> models)
- {
- PXR_EnterprisePlugin.UPxr_SetWDModelsCallback(models);
- }
- /// <summary>
- /// Sets the callback for the scanning result, which returns the JSON string that contains the devices previously connected for screencast and the devices currently found for screencast.
- /// </summary>
- /// <param name="callback">
- /// Returns a JSON string that contains the currently scanned device.
- /// </param>
- public static void SetWDJsonCallback(Action<string> callback)
- {
- PXR_EnterprisePlugin.UPxr_SetWDJsonCallback(callback);
- }
- /// <summary>
- /// Manually updates the list of devices for screencast.
- /// </summary>
- public static void UpdateWifiDisplays()
- {
- PXR_EnterprisePlugin.UPxr_UpdateWifiDisplays();
- }
- /// <summary>
- /// Gets the information of the currently connected device.
- /// </summary>
- /// <returns>The information of the currently connected device.</returns>
- public static string GetConnectedWD()
- {
- return PXR_EnterprisePlugin.UPxr_GetConnectedWD();
- }
- /// <summary>
- /// Switches the large space scene on.
- /// @note Supported by 6Dof devices.
- /// </summary>
- /// <param name="open">Whether to switch the large space scene on:
- /// * `true`: switch on
- /// * `false`: not to switch on
- /// </param>
- /// <param name="callback">Callback:
- /// * `true`: success
- /// * `false`: failure
- /// </param>
- public static void SwitchLargeSpaceScene(bool open, Action<bool> callback)
- {
- PXR_EnterprisePlugin.UPxr_SwitchLargeSpaceScene(open, callback);
- }
- /// <summary>
- /// Gets the status of the large space scene.
- /// @note Supported by 6Dof devices.
- /// </summary>
- /// <param name="callback">Returns the status of large space:
- /// * `0`: switched off
- /// * `1`: switched on
- /// </param>
- public static void GetSwitchLargeSpaceStatus(Action<string> callback)
- {
- PXR_EnterprisePlugin.UPxr_GetSwitchLargeSpaceStatus(callback);
- }
- /// <summary>
- /// Saves the large space map.
- /// @note Supported by 6Dof devices.
- /// </summary>
- /// <returns>Whether the large space map has been saved:
- /// * `true`: saved
- /// * `false`: failed to save
- /// </returns>
- public static bool SaveLargeSpaceMaps()
- {
- return PXR_EnterprisePlugin.UPxr_SaveLargeSpaceMaps();
- }
- /// <summary>
- /// Exports maps. The exported maps are stored in the /maps/export file.
- /// @note Supported by 6Dof devices.
- /// </summary>
- /// <param name="callback">Returns the result:
- /// * `true`: exported
- /// * `false`: failed to export
- /// </param>
- public static void ExportMaps(Action<bool> callback)
- {
- PXR_EnterprisePlugin.UPxr_ExportMaps(callback);
- }
- /// <summary>
- /// Imports maps. Need to copy maps to the /maps folder.
- /// @note Supported by 6Dof devices.
- /// </summary>
- /// <param name="callback">Returns the result:
- /// * `true`: imported
- /// * `false`: failed to import
- /// </param>
- public static void ImportMaps(Action<bool> callback)
- {
- PXR_EnterprisePlugin.UPxr_ImportMaps(callback);
- }
- /// <summary>
- /// Gets each CPU's utilization for the current device.
- /// </summary>
- /// <returns>An array of CPU utilization info.</returns>
- public static float[] GetCpuUsages()
- {
- return PXR_EnterprisePlugin.UPxr_GetCpuUsages();
- }
- /// <summary>
- /// Gets device temperature in Celsius.
- /// </summary>
- /// <param name="type">The requested type of device temperature:
- /// * `DEVICE_TEMPERATURE_CPU`: CPU temperature
- /// * `DEVICE_TEMPERATURE_GPU`: GPU temperature
- /// * `DEVICE_TEMPERATURE_BATTERY`: battery temperature
- /// * `DEVICE_TEMPERATURE_SKIN`: surface temperature
- /// </param>
- /// <param name="source">The requested source of device temperature:
- /// * `TEMPERATURE_CURRENT`: current temperature
- /// * `TEMPERATURE_THROTTLING`: temperature threshold for throttling
- /// * `TEMPERATURE_SHUTDOWN`: temperature threshold for shutdown
- /// * `TEMPERATURE_THROTTLING_BELOW_VR_MIN`: temperature threshold for throttling. If the actual temperature is higher than the threshold, the lowest clock frequency for VR mode will not be met
- /// </param>
- /// <returns>An array of requested float device temperatures in Celsius.</returns>
- public static float[] GetDeviceTemperatures(int type, int source)
- {
- return PXR_EnterprisePlugin.UPxr_GetDeviceTemperatures(type, source);
- }
- /// <summary>
- /// Captures the current screen.
- /// @note Not supported by G2 4K devices.
- /// </summary>
- public static void Capture()
- {
- PXR_EnterprisePlugin.UPxr_Capture();
- }
- /// <summary>
- /// Records the screen. Call this function again to stop recording.
- /// @note Not supported by G2 4K devices.
- /// </summary>
- public static void Record()
- {
- PXR_EnterprisePlugin.UPxr_Record();
- }
- /// <summary>
- /// Connects the device to a specified Wi-Fi.
- /// </summary>
- /// <param name="ssid">Wi-Fi name.</param>
- /// <param name="pwd">Wi-Fi password.</param>
- /// <param name="ext">Reserved parameter, pass `0` by default.</param>
- /// <param name="callback">The callback for indicating whether the Wi-Fi connection is successful:
- /// * `0`: connected
- /// * `1`: password error
- /// * `2`: unknown error
- /// </param>
- public static void ControlSetAutoConnectWIFIWithErrorCodeCallback(String ssid, String pwd, int ext, Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_ControlSetAutoConnectWIFIWithErrorCodeCallback(ssid, pwd, ext, callback);
- }
- /// <summary>
- /// Keeps an app active. In other words, improves the priority of an app, thereby making the system not to force quit the app.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA-5.2.8 or later).
- /// </summary>
- /// <param name="appPackageName">App package name.</param>
- /// <param name="keepAlive">Whether to keep the app active (i.e., whether to enhance the priority of the app):
- /// * `true`: keep
- /// * `false`: not keep
- /// </param>
- /// <param name="ext">Reserved parameter, pass `0`.</param>
- public static void AppKeepAlive(String appPackageName, bool keepAlive, int ext)
- {
- PXR_EnterprisePlugin.UPxr_AppKeepAlive(appPackageName, keepAlive, ext);
- }
- /// <summary>
- /// Schedules auto startup for the device.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA-5.2.8 or later).
- /// </summary>
- /// <param name="year">Year, for example, `2022`.</param>
- /// <param name="month">Month, for example, `2`.</param>
- /// <param name="day">Day, for example, `22`.</param>
- /// <param name="hour">Hour, for example, `22`.</param>
- /// <param name="minute">Minute, for example, `22`.</param>
- /// <param name="open">Whether to enable scheduled auto startup for the device:
- /// * `true`: enable
- /// * `false`: disable
- /// </param>
- public static void TimingStartup(int year, int month, int day, int hour, int minute, bool open)
- {
- PXR_EnterprisePlugin.UPxr_TimingStartup(year, month, day, hour, minute, open);
- }
- /// <summary>
- /// Schedules auto shutdown for the device.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version 5.4.0 or later).
- /// </summary>
- /// <param name="year">Year, for example, `2022`.</param>
- /// <param name="month">Month, for example, `2`.</param>
- /// <param name="day">Day, for example, `22`.</param>
- /// <param name="hour">Hour, for example, `22`.</param>
- /// <param name="minute">Minute, for example, `22`.</param>
- /// <param name="open">Whether to enable scheduled auto shutdown for the device:
- /// * `true`: enable
- /// * `false`: disable
- /// </param>
- public static void TimingShutdown(int year, int month, int day, int hour, int minute, bool open)
- {
- PXR_EnterprisePlugin.UPxr_TimingShutdown(year, month, day, hour, minute, open);
- }
- /// <summary>
- /// Displays a specified settings screen.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA-5.2.8 or later).
- /// </summary>
- /// <param name="settingsEnum">The 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.
- /// </param>
- /// <param name="hideOtherItem">Whether to display the selected settings screen:
- /// * `true`: display
- /// * `false`: hide
- /// </param>
- /// <param name="ext">Reserved parameter, pass `0`.</param>
- public static void StartVrSettingsItem(StartVRSettingsEnum settingsEnum, bool hideOtherItem, int ext)
- {
- PXR_EnterprisePlugin.UPxr_StartVrSettingsItem(settingsEnum, hideOtherItem, ext);
- }
- /// <summary>
- /// Changes the Volume button's function to that of the Home and Enter button's, or restores the volume adjustment function to the Volume button.
- /// @note Supported by PICO 4 Enterprise with system version OTA-5.2.8 or later.
- /// </summary>
- /// <param name="switchEnum">Whether to change the Volume button's function:
- /// * `S_ON`: change
- /// * `S_OFF`: do not change
- /// </param>
- /// <param name="ext">Reserved parameter, pass `0`.</param>
- public static void SwitchVolumeToHomeAndEnter(SwitchEnum switchEnum, int ext)
- {
- PXR_EnterprisePlugin.UPxr_SwitchVolumeToHomeAndEnter(switchEnum, ext);
- }
- /// <summary>
- /// Gets whether the Volume button's function has been changed to that of the Home and Enter button's.
- /// @note Supported by PICO 4 Enterprise with system version OTA-5.2.8 or later.
- /// </summary>
- /// <returns>
- /// * `S_ON`: changed
- /// * `S_OFF`: not changed
- /// </returns>
- public static SwitchEnum IsVolumeChangeToHomeAndEnter()
- {
- return PXR_EnterprisePlugin.UPxr_IsVolumeChangeToHomeAndEnter();
- }
- /// <summary>
- /// Upgrades the OTA.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA0-5.2.8 or later).
- /// </summary>
- /// <param name="otaPackagePath">The location of the OTA package.</param>
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// * `21`: OTA package version too low
- /// </returns>
- public static int InstallOTAPackage(String otaPackagePath)
- {
- return PXR_EnterprisePlugin.UPxr_InstallOTAPackage(otaPackagePath);
- }
- /// <summary>
- /// Gets the configuration of the Wi-Fi network that the device automatically connects to.
- /// </summary>
- /// <returns>The SSID and password of the Wi-Fi network.</returns>
- public static string GetAutoConnectWiFiConfig()
- {
- return PXR_EnterprisePlugin.UPxr_GetAutoConnectWiFiConfig();
- }
- /// <summary>
- /// Gets the scheduled auto startup settings for the device.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA-5.2.8 or later).
- /// </summary>
- /// <returns>
- /// * `open`: the status of scheduled auto startup:
- /// * `true`: enabled
- /// * `false`: disabled
- /// * `time`: the time when the device auto starts up, for example, `1658980380000`. Returned when `open` is `true`.
- /// </returns>
- public static string GetTimingStartupStatus()
- {
- return PXR_EnterprisePlugin.UPxr_GetTimingStartupStatus();
- }
- /// <summary>
- /// Gets the scheduled auto shutdown settings for the device.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA-5.2.8 or later).
- /// </summary>
- /// <returns>
- /// * `open`: the status of scheduled auto shutdown:
- /// * `true`: enabled
- /// * `false`: disabled
- /// * `time`: the time when the device auto shuts down, for example, `1658980380000`. Returned when `open` is `true`.
- /// </returns>
- public static string GetTimingShutdownStatus()
- {
- return PXR_EnterprisePlugin.UPxr_GetTimingShutdownStatus();
- }
- /// <summary>
- /// Gets the status of a specified controller button.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA0-5.2.8 or later).
- /// </summary>
- /// <param name="pxrControllerKey">The enumerations of controller button:
- /// * `CONTROLLER_KEY_JOYSTICK`
- /// * `CONTROLLER_KEY_MENU`
- /// * `CONTROLLER_KEY_TRIGGER`
- /// * `CONTROLLER_KEY_RIGHT_A`
- /// * `CONTROLLER_KEY_RIGHT_B`
- /// * `CONTROLLER_KEY_LEFT_X`
- /// * `CONTROLLER_KEY_LEFT_Y`
- /// * `CONTROLLER_KEY_LEFT_GRIP`
- /// * `CONTROLLER_KEY_RIGHT_GRIP`
- /// </param>
- /// <returns>The button's status:
- /// * `0`: disabled
- /// * `1`: enabled
- /// </returns>
- public static int GetControllerKeyState(ControllerKeyEnum pxrControllerKey)
- {
- return PXR_EnterprisePlugin.UPxr_GetControllerKeyState(pxrControllerKey);
- }
- /// <summary>
- /// Enables or disables a specified controller button.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA-5.2.8 or later).
- /// </summary>
- /// <param name="pxrControllerKey">The enumerations of controller button:
- /// * `CONTROLLER_KEY_JOYSTICK`
- /// * `CONTROLLER_KEY_MENU`
- /// * `CONTROLLER_KEY_TRIGGER`
- /// * `CONTROLLER_KEY_RIGHT_A`
- /// * `CONTROLLER_KEY_RIGHT_B`
- /// * `CONTROLLER_KEY_LEFT_X`
- /// * `CONTROLLER_KEY_LEFT_Y`
- /// * `CONTROLLER_KEY_LEFT_GRIP`
- /// * `CONTROLLER_KEY_RIGHT_GRIP`
- /// </param>
- /// <param name="status">Whether to enable or disable the button:
- /// * `S_ON`: enable
- /// * `S_OFF`: disable
- /// </param>
- /// <returns>
- /// `0` indicates success, other values indicate failure.
- /// </returns>
- public static int SetControllerKeyState(ControllerKeyEnum pxrControllerKey, SwitchEnum status)
- {
- return PXR_EnterprisePlugin.UPxr_SetControllerKeyState(pxrControllerKey, status);
- }
- /// <summary>
- /// Gets the status of the switch which is for powering off the USB cable when the device is shut down.
- /// </summary>
- /// <returns>The switch's status:
- /// * `S_ON`: on
- /// * `S_OFF`: off
- /// </returns>
- public static SwitchEnum GetPowerOffWithUSBCable()
- {
- return PXR_EnterprisePlugin.UPxr_ControlGetPowerOffWithUSBCable();
- }
- /// <summary>
- /// Gets the screen timeout setting for the device.
- /// </summary>
- /// <returns>`PBS_ScreenOffDelayTimeEnum`: the enumerations of screen timeout. </returns>
- public static ScreenOffDelayTimeEnum GetScreenOffDelay()
- {
- return PXR_EnterprisePlugin.UPxr_PropertyGetScreenOffDelay();
- }
- /// <summary>
- /// Gets the sleep timeout settings for the device.
- /// </summary>
- /// <returns>`PBS_SleepDelayTimeEnum`: the enumeration of sleep timeout.</returns>
- public static SleepDelayTimeEnum GetSleepDelay()
- {
- return PXR_EnterprisePlugin.UPxr_PropertyGetSleepDelay();
- }
- /// <summary>
- /// Gets the current settings for the Power button.
- /// </summary>
- /// <returns>
- /// * `null`: not set
- /// * `singleTap`: whether a single-tap event has been set
- /// * `longTap`: whether a long-press event has been set
- /// * `longPressTime`: the time after which the long-press event takes place. Returned when `longTap` is `true`.
- /// </returns>
- public static string GetPowerKeyStatus()
- {
- return PXR_EnterprisePlugin.UPxr_PropertyGetPowerKeyStatus();
- }
- /// <summary>
- /// Get the Enter button's status.
- /// </summary>
- /// <returns>
- /// * `0`: disabled
- /// * `1`: enabled
- /// </returns>
- public static int GetEnterKeyStatus()
- {
- return PXR_EnterprisePlugin.UPxr_GetEnterKeyStatus();
- }
- /// <summary>
- /// Get the Volume button's status.
- /// </summary>
- /// <returns>
- /// * `0`: disabled
- /// * `1`: enabled
- /// </returns>
- public static int GetVolumeKeyStatus()
- {
- return PXR_EnterprisePlugin.UPxr_GetVolumeKeyStatus();
- }
- /// <summary>
- /// Get the Back button's status.
- /// </summary>
- /// <returns>
- /// * `0`: disabled
- /// * `1`: enabled
- /// </returns>
- public static int GetBackKeyStatus()
- {
- return PXR_EnterprisePlugin.UPxr_GetBackKeyStatus();
- }
- /// <summary>
- /// Gets the event settings for the Home button.
- /// </summary>
- /// <param name="homeEvent">The enumerations of event type:
- /// * `SINGLE_CLICK`: single-click event
- /// * `DOUBLE_CLICK`: double-click event
- /// * `LONG_PRESS`: long-press event
- /// </param>
- /// <returns>
- /// * For `SINGLE_CLICK` and `DOUBLE_CLICK`, the event(s) you set will be returned.
- /// * For `LONG_PRESS`, the time and event you set will be returned. If you have not set a time for a long-press event, time will be `null`.
- ///
- /// * If you have not set any event for the event type you pass in the request, the response will return `null`.
- /// * For event enumerations, see `PropertySetHomeKey` or `PropertySetHomeKeyAll`.
- /// </returns>
- public static string GetHomeKeyStatus(HomeEventEnum homeEvent)
- {
- return PXR_EnterprisePlugin.UPxr_PropertyGetHomeKeyStatus(homeEvent);
- }
- /// <summary>
- /// Gets the status of a specified system function switch.
- /// </summary>
- /// <param name="systemFunction">The enumerations of system function switch:
- /// * `SFS_USB`: USB debugging
- /// * `SFS_AUTOSLEEP`: auto sleep
- /// * `SFS_SCREENON_CHARGING`: screen-on charging
- /// * `SFS_OTG_CHARGING`: OTG charging (supported by G2 devices)
- /// * `SFS_RETURN_MENU_IN_2DMODE`: display the Return icon on the 2D screen
- /// * `SFS_COMBINATION_KEY`: combination key
- /// * `SFS_CALIBRATION_WITH_POWER_ON`: calibration with power on
- /// * `SFS_SYSTEM_UPDATE`: system update (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_CAST_SERVICE`: phone casting service
- /// * `SFS_EYE_PROTECTION`: eye-protection mode
- /// * `SFS_SECURITY_ZONE_PERMANENTLY`: permanently disable the 6DoF play area (supported by PICO Neo2 devices)
- /// * `SFS_GLOBAL_CALIBRATION`: global calibration (supported by PICO G2 devices)
- /// * `SFS_Auto_Calibration`: auto calibration
- /// * `SFS_USB_BOOT`: USB plug-in boot
- /// * `SFS_VOLUME_UI`: global volume UI (need to restart the device to make the setting take effect)
- /// * `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_USB_FORCE_HOST`: set the Neo3 Pro/Pro Eye device as the host device
- /// * `SFS_SET_DEFAULT_SAFETY_ZONE`: set a default play area for PICO Neo3 and PICO 4 series devices
- /// * `SFS_ALLOW_RESET_BOUNDARY`: allow to reset customized boundary for PICO Neo3 series devices
- /// * `SFS_BOUNDARY_CONFIRMATION_SCREEN`: whether to display the boundary confirmation screen for PICO Neo3 and PICO 4 series devices
- /// * `SFS_LONG_PRESS_HOME_TO_RECENTER`: long press the Home button to recenter for PICO Neo3 and PICO 4 series devices
- /// * `SFS_POWER_CTRL_WIFI_ENABLE`: stay connected to the network when the device sleeps/turns off (supported by PICO Neo3 Pro with system version 4.8.0 or later and PICO 4 Enterprise with system version OTA-5.2.8 or later)
- /// * `SFS_WIFI_DISABLE`: disable Wi-Fi (supported by PICO Neo3 Pro with system version 4.8.0 or later and PICO 4 Enterprise with system version OTA-5.2.8 or later)
- /// * `SFS_SIX_DOF_SWITCH`: 6DoF position tracking for PICO Neo3 and PICO 4 series devices
- /// * `SFS_INVERSE_DISPERSION`: anti-dispersion (supported by PICO Neo3 Pro with system version 4.8.0 or later and PICO 4 Enterprise with system version OTA0-5.2.8 or later)
- /// * `SFS_LOGCAT`: system log switch (/data/logs) (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_PSENSOR`: PSensor switch (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SYSTEM_UPDATE_OTA`: OTA upgrade (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SYSTEM_UPDATE_APP`: app upgrade and update (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_WLAN_UI`: quickly set whether to show the WLAN button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_BOUNDARY_UI`: quickly set whether to show the boundary button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_BLUETOOTH_UI`: quickly set whether to show the bluetooth button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_CLEAN_TASK_UI`: quickly set whether to show the one-click clear button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_IPD_ADJUSTMENT_UI`: quickly set whether to show the IPD adjustment button (supported by PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_POWER_UI`: quickly set whether to show the power button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_SHORTCUT_SHOW_EDIT_UI`: quickly set whether to show the edit button (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_BASIC_SETTING_APP_LIBRARY_UI`: the button for customizing the app library (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_BASIC_SETTING_SHORTCUT_UI`: the button for customizing quick settings (supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later)
- /// * `SFS_LED_FLASHING_WHEN_SCREEN_OFF`: whether to keep the LED indicator light on when the device's screen is off and the battery is below 20% (supported by PICO G3 devices)
- /// * `SFS_BASIC_SETTING_CUSTOMIZE_SETTING_UI`: customize settings item to show or hide in basic settings
- /// * `SFS_BASIC_SETTING_SHOW_APP_QUIT_CONFIRM_DIALOG`: whether to show the app-quit dialog box when switching to a new app
- /// * `SFS_BASIC_SETTING_KILL_BACKGROUND_VR_APP`: whether to kill background VR apps (`1`: kill, and this is the default setting; `2`: do not kill)
- /// * `SFS_BASIC_SETTING_SHOW_CAST_NOTIFICATION`: whether to show a blue icon when casting the screen. The icon is displayed by default, and you can set the value to `0` to hide it.
- /// * `SFS_AUTOMATIC_IPD`: auto IPD switch (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.7.0 or later)
- /// * `SFS_QUICK_SEETHROUGH_MODE`: quick seethrough mode switch (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.7.0 or later)
- /// * `SFS_HIGN_REFERSH_MODE`: high refresh mode switch (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.7.0 or later)
- /// * `SFS_SEETHROUGH_APP_KEEP_RUNNING`: set whether to keep the app running under the seethrough mode (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_OUTDOOR_TRACKING_ENHANCEMENT`: enhance outdoor position tracking (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_AUTOIPD_AUTO_COMFIRM`: quick auto-IPD (supported by PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_LAUNCH_AUTOIPD_IF_GLASSES_WEARED`: set whether to launch auto-IPD after wearing the headset (supported by PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_GESTURE_RECOGNITION_HOME_ENABLE`: Home gesture switch (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_GESTURE_RECOGNITION_RESET_ENABLE`: enable/disable the Reset gesture (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.8.0 or later)
- /// * `SFS_AUTO_COPY_FILES_FROM_USB_DEVICE`: automatically import OTG resources (supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.8.0 or later)
- /// </param>
- /// <param name="callback">The callback that returns the switch's status:
- /// * `0`: off
- /// * `1`: on
- /// * `2`: not supported by device
- /// For `SFS_SYSTEM_UPDATE`, the returns are as follows:
- /// * `0`: off
- /// * `1`: OTA upgrade on
- /// * `2`: app upgrade on
- /// * `3`: OTA and app upgrade on
- /// </param>
- public static void GetSwitchSystemFunctionStatus(SystemFunctionSwitchEnum systemFunction, Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_GetSwitchSystemFunctionStatus(systemFunction, callback);
- }
- /// <summary>
- /// Gets the configured USB mode.
- /// </summary>
- /// <returns>
- /// * `MTP`: MTP mode
- /// * `CHARGE`: charging mode
- /// </returns>
- public static string GetUsbConfigurationOption()
- {
- return PXR_EnterprisePlugin.UPxr_SwitchGetUsbConfigurationOption();
- }
- /// <summary>
- /// Gets the current launcher.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA0-5.2.8 or later).
- /// </summary>
- /// <returns>The package name or class name of the launcher.</returns>
- public static string GetCurrentLauncher()
- {
- return PXR_EnterprisePlugin.UPxr_GetCurrentLauncher();
- }
- /// <summary>
- /// Initializes the screencast service.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA0-5.2.8 or later).
- /// </summary>
- /// <param name="callback">The callback:
- /// * `0`: disconnect
- /// * `1`: connect
- /// * `2`: no microphone permission
- /// </param>
- /// <returns>
- /// * `0`: failure
- /// * `1`: success
- /// Returns `0` when there is no microphone permission.
- /// </returns>
- public static int PICOCastInit(Action<int> callback)
- {
- return PXR_EnterprisePlugin.UPxr_PICOCastInit(callback);
- }
- /// <summary>
- /// Sets whether to show the screencast authorization window.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA0-5.2.8 or later).
- /// </summary>
- /// <param name="authZ">
- /// * `0`: ask every time (default)
- /// * `1`: always allow
- /// * `2`: not accepted
- /// </param>
- /// <returns>
- /// * `0`: failure
- /// * `1`: success
- /// </returns>
- public static int PICOCastSetShowAuthorization(int authZ)
- {
- return PXR_EnterprisePlugin.UPxr_PICOCastSetShowAuthorization(authZ);
- }
- /// <summary>
- /// Gets the setting of whether to show the screencast authorization window.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA0-5.2.8 or later).
- /// </summary>
- /// <returns>
- /// * `0`: ask every time (default)
- /// * `1`: always allow
- /// * `2`: not accepted
- /// </returns>
- public static int PICOCastGetShowAuthorization()
- {
- return PXR_EnterprisePlugin.UPxr_PICOCastGetShowAuthorization();
- }
- /// <summary>
- /// Gets the URL for screencast.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA0-5.2.8 or later).
- /// </summary>
- /// <param name="urlType">The enumerations of URL type:
- /// * `NormalURL`: Normal URL. The screencast authorization window will show if it is not set.
- /// * `NoConfirmURL`: Non-confirm URL. The screencast authorization window will not show in the browser. Screencast will start once you enter the URL.
- /// * `RtmpURL`: Returns the RTMP live streaming URL. The screencast authorization window will not appear on the VR headset's screen.
- /// </param>
- /// <returns>The URL for screencast.</returns>
- public static string PICOCastGetUrl(PICOCastUrlTypeEnum urlType)
- {
- return PXR_EnterprisePlugin.UPxr_PICOCastGetUrl(urlType);
- }
- /// <summary>
- /// Stops screencast.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA0-5.2.8 or later).
- /// </summary>
- /// <returns>
- /// * `0`: failure
- /// * `1`: success
- /// </returns>
- public static int PICOCastStopCast()
- {
- return PXR_EnterprisePlugin.UPxr_PICOCastStopCast();
- }
- /// <summary>
- /// sets screencast options.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA0-5.2.8 or later).
- /// </summary>
- /// <param name="castOptionOrStatus">The enumerations of the property to set:
- /// * `OPTION_RESOLUTION_LEVEL`: resolution level
- /// * `OPTION_BITRATE_LEVEL`: bitrate level
- /// * `OPTION_AUDIO_ENABLE`: whether to enable the audio
- /// </param>
- /// <param name="castOptionValue">The values that can be set for each property:
- /// * For `OPTION_RESOLUTION_LEVEL`:
- /// * `OPTION_VALUE_RESOLUTION_HIGH`
- /// * `OPTION_VALUE_RESOLUTION_MIDDLE`
- /// * `OPTION_VALUE_RESOLUTION_AUTO`
- /// * `OPTION_VALUE_RESOLUTION_HIGH_2K`
- /// * `OPTION_VALUE_RESOLUTION_HIGH_4K`
- /// * For `OPTION_BITRATE_LEVEL`:
- /// * `OPTION_VALUE_BITRATE_HIGH`
- /// * `OPTION_VALUE_BITRATE_MIDDLE`
- /// * `OPTION_VALUE_BITRATE_LOW`
- /// * For `OPTION_AUDIO_ENABLE`:
- /// * `OPTION_VALUE_AUDIO_ON`
- /// * `OPTION_VALUE_AUDIO_OFF`
- /// </param>
- /// <returns>
- /// * `0`: failure
- /// * `1`: success
- /// </returns>
- public static int PICOCastSetOption(PICOCastOptionOrStatusEnum castOptionOrStatus, PICOCastOptionValueEnum castOptionValue)
- {
- return PXR_EnterprisePlugin.UPxr_PICOCastSetOption(castOptionOrStatus, castOptionValue);
- }
- /// <summary>
- /// Gets the screencast settings for the current device.
- /// @note Supported by PICO Neo3 Pro (system version 4.8.0 or later) and PICO 4 Enterprise (system version OTA0-5.2.8 or later).
- /// </summary>
- /// <param name="castOptionOrStatus">The enumerations of the screencast property to get setting for:
- /// * `OPTION_RESOLUTION_LEVEL`: resolution level
- /// * `OPTION_BITRATE_LEVEL`: bitrate level
- /// * `OPTION_AUDIO_ENABLE`: whether the audio is enabled
- /// * `PICOCAST_STATUS`: returns the current screencast status
- /// </param>
- /// <returns>The setting of the selected property:
- /// * For `OPTION_RESOLUTION_LEVEL`:
- /// * `OPTION_VALUE_RESOLUTION_HIGH`
- /// * `OPTION_VALUE_RESOLUTION_MIDDLE`
- /// * `OPTION_VALUE_RESOLUTION_AUTO`
- /// * `OPTION_VALUE_RESOLUTION_HIGH_2K`
- /// * `OPTION_VALUE_RESOLUTION_HIGH_4K`
- /// * For `OPTION_BITRATE_LEVEL`:
- /// * `OPTION_VALUE_BITRATE_HIGH`
- /// * `OPTION_VALUE_BITRATE_MIDDLE`
- /// * `OPTION_VALUE_BITRATE_LOW`
- /// * For `OPTION_AUDIO_ENABLE`:
- /// * `OPTION_VALUE_AUDIO_ON`
- /// * `OPTION_VALUE_AUDIO_OFF`
- /// * `PICOCAST_STATUS` :
- /// * `STATUS_VALUE_STATE_STARTED`
- /// * `STATUS_VALUE_STATE_STOPPED`
- /// * `STATUS_VALUE_ERROR`
- /// </returns>
- public static PICOCastOptionValueEnum PICOCastGetOptionOrStatus(PICOCastOptionOrStatusEnum castOptionOrStatus)
- {
- return PXR_EnterprisePlugin.UPxr_PICOCastGetOptionOrStatus(castOptionOrStatus);
- }
- /// <summary>Sets the system language for the device.
- /// For a language that is spoken in different countries/regions, the system language is then co-set by the language code and the device's country/region code.
- /// For example, if the language code is set to `en` and the device's country/region code is `US`, the system language will be set to English (United States).</summary>
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- ///
- /// <param name="language">Supported language codes:
- /// * `cs`: Czech
- /// * `da`: Danish
- /// * `de`: German
- /// * `el`: Greek
- /// * `en`: English (United States / United Kingdom)
- /// * `es`: Spanish
- /// * `fi`: Finnish
- /// * `fr`: French
- /// * `it`: Italian
- /// * `ja`: Japanese
- /// * `ko`: Korean
- /// * `ms`: Malay
- /// * `nb`: Norwegian
- /// * `nl`: Dutch
- /// * `pl`: Polish
- /// * `pt`: Portuguese (Brazil / Portugal)
- /// * `ro`: Romanian
- /// * `ru`: Russian
- /// * `sv`: Swedish
- /// * `th`: Thai
- /// * `tr`: Turkish
- /// * `zh`: Chinese (Simplified) / Chinese (Hong Kong SAR of China) / Chinese (Traditional)
- /// For devices in Mainland China / Taiwan, China / Hong Kong SAR of China / Macao SAR of China, the country/region code has been defined in factory settings.
- /// </param>
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// * `22`: invalid language
- /// </returns>
- public static int SetSystemLanguage(String language)
- {
- return PXR_EnterprisePlugin.UPxr_SetSystemLanguage(language);
- }
- /// <summary>Gets the device's system language.</summary>
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- ///
- /// <returns>The system language set for the device. For details, refer to the
- /// parameter description for `SetSystemLanguage`.</returns>
- public static String GetSystemLanguage()
- {
- return PXR_EnterprisePlugin.UPxr_GetSystemLanguage();
- }
- /// <summary>Sets a default Wi-Fi network for the device. Once set, the device will automatically connect to the Wi-Fi network if accessible.</summary>
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- ///
- /// <param name="ssid">The SSID (name) of the Wi-Fi network.</param>
- /// <param name="pwd">The password of the Wi-Fi network.</param>
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// </returns>
- public static int ConfigWifi(String ssid, String pwd)
- {
- return PXR_EnterprisePlugin.UPxr_ConfigWifi(ssid, pwd);
- }
- /// <summary>Gets the device's default Wi-Fi network.</summary>
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- ///
- /// <returns>The SSID (name) of the Wi-Fi network.</returns>
- public static String[] GetConfiguredWifi()
- {
- return PXR_EnterprisePlugin.UPxr_GetConfiguredWifi();
- }
- /// <summary>Sets a country/region for the device.</summary>
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- ///
- /// <param name="countryCode">The country/region code co-determines the device's system language with the language code you set via `SetSystemLanguage`.
- /// Below are supported country/region codes:
- /// * `AD`: Andorra
- /// * `AT`: Austria
- /// * `AU`: Australia
- /// * `BE`: Belgium
- /// * `BG`: Bulgaria
- /// * `CA`: Canada
- /// * `CH`: Switzerland
- /// * `CZ`: Czech Republic
- /// * `DE`: Germany
- /// * `DK`: Denmark
- /// * `EE`: Estonia
- /// * `ES`: Spain
- /// * `FI`: Finland
- /// * `FR`: France
- /// * `GB`: the Great Britain
- /// * `GR`: Greece
- /// * `HR`: Croatia
- /// * `HU`: Hungary
- /// * `IE`: Ireland
- /// * `IL`: Israel
- /// * `IS`: Iceland
- /// * `IT`: Italy
- /// * `JP`: Japan
- /// * `KR`: Korea
- /// * `LI`: Liechtenstein
- /// * `LT`: Lithuania
- /// * `LU`: Luxembourg
- /// * `LV`: Latvia
- /// * `MC`: Monaco
- /// * `MT`: Malta
- /// * `MY`: Malaysia
- /// * `NL`: Netherlands
- /// * `NO`: Norway
- /// * `NZ`: New Zealand
- /// * `PL`: Poland
- /// * `PT`: Portugal
- /// * `RO`: Romania
- /// * `SE`: Sweden
- /// * `SG`: Singapore
- /// * `SI`: Slovenia
- /// * `SK`: Slovakia
- /// * `SM`: San Marino
- /// * `TR`: Turkey
- /// * `US`: the United States
- /// * `VA`: Vatican
- /// </param>
- /// <param name="callback">Set the callback to get the result:
- /// * `0`: success
- /// * `1`: failure
- /// </param>
- public static int SetSystemCountryCode(String countryCode, Action<int> callback)
- {
- return PXR_EnterprisePlugin.UPxr_SetSystemCountryCode(countryCode, callback);
- }
- /// <summary>Gets the device's country/region code.</summary>
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- ///
- /// <returns>A string value that indicates the device's current country/region code.
- /// For supported country/region codes, see the parameter description in `SetSystemCountryCode`.</returns>
- public static string GetSystemCountryCode()
- {
- return PXR_EnterprisePlugin.UPxr_GetSystemCountryCode();
- }
- /// <summary>Sets the page to skip in initialization settings.</summary>
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- ///
- /// <param name="flag">Set the flag.
- /// The first 6 bits are valid, the 7th to 32rd bits are reserved. For each bit, `0` indicates showing and `1` indicates hiding.
- /// * `Constants#INIT_SETTING_HANDLE_CONNECTION_TEACHING`: the controller connection tutorial page
- /// * `Constants#INIT_SETTING_TRIGGER_KEY_TEACHING`: the Trigger button tutorial page
- /// * `Constants#INIT_SETTING_SELECT_LANGUAGE`: the language selection page
- /// * `Constants#INIT_SETTING_SELECT_COUNTRY`: the country/region selection page. Only available for devices in non-Mainland China countries/regions.
- /// * `Constants#INIT_SETTING_WIFI_SETTING`: the Wi-Fi settings page
- /// * `Constants#INIT_SETTING_QUICK_SETTING`: the quick settings page
- /// </param>
- /// Below is an example implementation:
- /// ```csharp
- /// int flag = Constants.INIT_SETTING_HANDLE_CONNECTION_TEACHING | Constants.INIT_SETTING_TRIGGER_KEY_TEACHING;
- /// int result = serviceBinder.pbsSetSkipInitSettingPage(flag,0);
- /// ```
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// </returns>
- public static int SetSkipInitSettingPage(int flag)
- {
- return PXR_EnterprisePlugin.UPxr_SetSkipInitSettingPage(flag);
- }
- /// <summary>Gets the page to skip in initialization settings.</summary>
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- ///
- /// <returns>Returns the flag set in `SetSkipInitSettingPage`.</returns>
- public static int GetSkipInitSettingPage()
- {
- return PXR_EnterprisePlugin.UPxr_GetSkipInitSettingPage();
- }
- /// <summary>Gets whether the initialization settings have been complete.</summary>
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- ///
- /// <returns>
- /// * `0`: not complete
- /// * `1`: complete
- /// </returns>
- public static int IsInitSettingComplete()
- {
- return PXR_EnterprisePlugin.UPxr_IsInitSettingComplete();
- }
- /// <summary>Starts an activity in another app.</summary>
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- /// <param name="packageName">(Optional) The app's package name.</param>
- /// <param name="className">(Optional) The app's class name.</param>
- /// <param name="action">(Optional) The action to be performed.</param>
- /// <param name="extra">The basic types of standard fields that can be used as extra data.</param>
- /// <param name="categories">Standard categories that can be used to further clarify an Intent. Add a new category to the intent.</param>
- /// <param name="flags">Add additional flags to the intent.</param>
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// </returns>
- public static int StartActivity(String packageName, String className, String action, String extra, String[] categories, int[] flags)
- {
- return PXR_EnterprisePlugin.UPxr_StartActivity(packageName, className, action, extra, categories, flags);
- }
- /// <summary>Shows/hides specified app(s) in the library.
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- /// </summary>
- /// <param name="packageNames">Package name(s). If there are multiple names, use commas (,) to separate them.</param>
- /// <param name="switchEnum">Specifies to show/hide the app(s), enums:
- /// * `S_ON`: show
- /// * `S_OFF`: hide
- /// </param>
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// </returns>
- public static int CustomizeAppLibrary(String[] packageNames, SwitchEnum switchEnum)
- {
- return PXR_EnterprisePlugin.UPxr_CustomizeAppLibrary(packageNames, switchEnum);
- }
- /// <summary>
- /// Gets the controller's battery level.
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- /// </summary>
- /// <returns>Returns the following information:
- /// * array[0]: the left controller's battery level
- /// * array[1]: the right controller's battery level
- /// * an integer from 1 to 5, which indicates the battery level, the bigger the integer, the higher the battery level
- /// </returns>
- public static int[] GetControllerBattery()
- {
- return PXR_EnterprisePlugin.UPxr_GetControllerBattery();
- }
- /// <summary>
- /// Gets the controller's connection status.
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- /// </summary>
- /// <returns>
- /// * `0`: both controllers are disconnected
- /// * `1`: the left controller is connected
- /// * `2`: the right controller is connected
- /// * `3`: both controllers are connected
- /// </returns>
- public static int GetControllerConnectState()
- {
- return PXR_EnterprisePlugin.UPxr_GetControllerConnectState();
- }
- /// <summary>
- /// Gets the apps that are hidden in the library.
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.4.0 or later.
- /// </summary>
- /// <returns>The packages names of hidden apps. Multiple names are separated by commas (,).</returns>
- public static string GetAppLibraryHideList()
- {
- return PXR_EnterprisePlugin.UPxr_GetAppLibraryHideList();
- }
- /// <summary>
- /// Sets the device that outputs audio during screen casting.
- /// @note
- /// - Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.5.0 or later.
- /// - This API is only for miracast.
- /// </summary>
- /// <param name="screencastAudioOutput">Specifies the device that outputs audio. Enumerations:
- /// * `AUDIO_SINK`: the HMD
- /// * `AUDIO_TARGET`: the receiver
- /// * `AUDIO_SINK_TARGET`: both the HMD and the receiver
- /// </param>
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// </returns>
- public static int SetScreenCastAudioOutput(ScreencastAudioOutputEnum screencastAudioOutput)
- {
- return PXR_EnterprisePlugin.UPxr_SetScreenCastAudioOutput(screencastAudioOutput);
- }
- /// <summary>
- /// Gets the device that outputs audio during screen casting.
- /// @note
- /// - Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.5.0 or later.
- /// - This API is only for miracast.
- /// </summary>
- /// <returns>
- /// Enumerations:
- /// * `AUDIO_SINK`: the HMD
- /// * `AUDIO_TARGET`: the receiver
- /// * `AUDIO_SINK_TARGET`: both the HMD and the receiver
- /// </returns>
- public static ScreencastAudioOutputEnum GetScreenCastAudioOutput()
- {
- return PXR_EnterprisePlugin.UPxr_GetScreenCastAudioOutput();
- }
- /// <summary>
- /// Displays or hides the specified tab or option on the Settings pane.
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.5.0 or later.
- /// </summary>
- /// <param name="customizeSettingsTabEnum">Specifies the tab or option to display or hide. Enumerations:
- /// * `CUSTOMIZE_SETTINGS_TAB_WLAN`: the "WLAN" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_CONTROLLER`: the "Controller" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_BLUETOOTH`: the "Bluetooth" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_DISPLAY`: the "Display" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_LAB`: the "LAB" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_GENERAL_FACTORY_RESET`: the "Factory Reset" option on the "General" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_GENERAL_LOCKSCREEN`: the "Lock Screen" option on the "General" tab
- /// </param>
- /// <param name="switchEnum">Sets to display or hide the specified tab or option:
- /// * `S_ON`: display
- /// * `S_OFF`: hide
- /// </param>
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// </returns>
- public static int UPxr_CustomizeSettingsTabStatus(CustomizeSettingsTabEnum customizeSettingsTabEnum, SwitchEnum switchEnum)
- {
- return PXR_EnterprisePlugin.UPxr_CustomizeSettingsTabStatus(customizeSettingsTabEnum, switchEnum);
- }
- /// <summary>
- /// Gets the status set for the specified tab or option on the Settings pane.
- /// @note Supported by PICO Neo3 Pro and PICO 4 Enterprise with system version 5.5.0 or later.
- /// </summary>
- /// <param name="customizeSettingsTabEnum">Specifies the tab or option to get status for. Enumerations:
- /// * `CUSTOMIZE_SETTINGS_TAB_WLAN`: the "WLAN" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_CONTROLLER`: the "Controller" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_BLUETOOTH`: the "Bluetooth" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_DISPLAY`: the "Display" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_LAB`: the "LAB" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_GENERAL_FACTORY_RESET`: the "Factory Reset" option on the "General" tab
- /// * `CUSTOMIZE_SETTINGS_TAB_GENERAL_LOCKSCREEN`: the "Lock Screen" option on the "General" tab
- /// </param>
- /// <returns>
- /// The status of the specified tab or option:
- /// * `S_ON`: displayed
- /// * `S_OFF`: hidden
- /// </returns>
- public static SwitchEnum UPxr_GetCustomizeSettingsTabStatus(CustomizeSettingsTabEnum customizeSettingsTabEnum)
- {
- return PXR_EnterprisePlugin.UPxr_GetCustomizeSettingsTabStatus(customizeSettingsTabEnum);
- }
-
- /// <summary>
- /// Shuts down the PICO device when the USB plug is unplugged or the plug runs out of power.
- /// </summary>
- /// <param name="switchEnum">Determines whether to enable/disable this function:
- /// * `S_ON`: enable
- /// * `S_OFF`: disable
- /// </param>
- public static void SetPowerOffWithUSBCable(SwitchEnum switchEnum)
- {
- PXR_EnterprisePlugin.UPxr_SetPowerOffWithUSBCable(switchEnum);
- }
- /// <summary>
- /// Removes a specific Home key event setting, which restores the event to its default setting.
- /// </summary>
- /// <param name="switchEnum">Specify a Home key event from the following:
- /// `PBS_HomeEventEnum. SINGLE_CLICK`: single-click event
- /// `PBS_HomeEventEnum. DOUBLE_CLICK`: double-click event
- /// `PBS_HomeEventEnum. LONG_PRESS`: long press event
- /// `PBS_HomeEventEnum. SINGLE_CLICK_RIGHT_CTL`: single-click on the right controller's Home button
- /// `PBS_HomeEventEnum. DOUBLE_CLICK_RIGHT_CTL`: double-click on the right controller's Home button
- /// `PBS_HomeEventEnum. LONG_PRESS_RIGHT_CTL`: long press on the right controller's Home button
- /// `PBS_HomeEventEnum. SINGLE_CLICK_LEFT_CTL`: single-click on the left controller's Home button
- /// `PBS_HomeEventEnum. DOUBLE_CLICK_LEFT_CTL`: double-click on the left controller's Home button
- /// `PBS_HomeEventEnum. LONG_PRESS_LEFT_CTL`: long press on the left controller's Home button
- /// `PBS_HomeEventEnum. SINGLE_CLICK_HMD`: single-click on the HMD's Home button
- /// `PBS_HomeEventEnum. DOUBLE_CLICK_HMD`: double-click on the HMD's Home button
- /// `PBS_HomeEventEnum. LONG_PRESS_HMD`: long press on the HMD's Home button
- /// </param>
- public static void RemoveControllerHomeKey(HomeEventEnum EventEnum)
- {
- PXR_EnterprisePlugin.UPxr_RemoveControllerHomeKey(EventEnum);
- }
-
- /// <summary>
- /// Sets the power on logo or the power on/off animation.
- /// </summary>
- /// <param name="powerOnOffLogoEnum">Specify a setting from the following:
- /// * `PBS_PowerOnOffLogoEnum. PLPowerOnLogo`: sets a logo for the first frame after powering on the device
- /// * `PBS_PowerOnOffLogoEnum. PLPowerOnAnimation`: sets the power on animation
- /// * `PBS_PowerOnOffLogoEnum. PLPowerOffAnimation`: sets the power off animation
- /// </param>
- /// <param name="path">
- /// * For setting a logo for the first frame after powering on the device, pass the path where the .img file is stored, for example, `/sdcard/bootlogo.img`.
- /// * For setting the power on/off animation, pass the folder where the pictures composing the animation is stored.
- /// </param>
- /// <param name="callback">Result callback:
- /// * `true`: success
- /// * `false`: failure
- /// </param>
- public static void SetPowerOnOffLogo(PowerOnOffLogoEnum powerOnOffLogoEnum, String path, Action<bool> callback)
- {
- PXR_EnterprisePlugin.UPxr_SetPowerOnOffLogo(powerOnOffLogoEnum,path,callback);
- }
- /// <summary>
- /// Sets an interpupillary distance (IPD).
- /// @note Supported by PICO 4 Enterprise with system version 5.7.0 or later.
- /// </summary>
- /// <param name="ipd">
- /// The IPD to set. Valid value range: [62,72]. Unit: millimeters.
- /// </param>
- /// <param name="callback">Result callback:
- /// * `0`: success
- /// * `1`: failure
- /// * `23`: the `ipd` value is out of the valid range
- /// </param>
- public static void SetIPD(float ipd, Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_SetIPD(ipd,callback);
- }
-
- /// <summary>
- /// Gets the device configured for miracast.
- /// </summary>
- /// <returns>
- /// The name of the device.
- /// </returns>
- public static string GetAutoMiracastConfig()
- {
- return PXR_EnterprisePlugin.UPxr_GetAutoMiracastConfig();
- }
-
- /// <summary>
- /// Sets screencast-related parameters.
- /// @note Supported by PICO Neo3 series and PICO 4 Enterprise with system version 5.7.0 or later.
- /// </summary>
- /// <param name="mediaFormat">
- /// The mediaFormat object to set. Currently, only support settings the bitrate.
- /// </param>
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// </returns>
- public static int SetPicoCastMediaFormat(PicoCastMediaFormat mediaFormat)
- {
- return PXR_EnterprisePlugin.UPxr_SetPicoCastMediaFormat(mediaFormat);
- }
-
- /// <summary>
- /// Gets the pose and ID of the marker.
- /// @note Supported by 6Dof devices.
- /// </summary>
- /// <param name="trackingMode">Specify a tracking origin mode from the following:
- /// * `TrackingOriginModeFlags.Device`: Device mode. The system sets the device's initial position as the origin. The device's height from the floor is not calculated.
- /// * `TrackingOriginModeFlags.Floor`: Floor mode. The system sets an origin based on the device's original position and the device's height from the floor.
- /// @note The PICO Unity OpenXR SDK only supports the `TrackingOriginModeFlags.Device` mode.
- /// </param>
- /// <param name="cameraYOffset">
- /// Set the offset added to the camera's Y direction, which is for simulating a user's height and is only applicable if you select the 'Device' mode.
- /// </param>
- /// <param name="markerInfos">
- /// The callback function for returning marker information.
- /// </param>
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// </returns>
- public static int SetMarkerInfoCallback(TrackingOriginModeFlags trackingMode,float cameraYOffset,Action<List<MarkerInfo>> markerInfos)
- {
- return PXR_EnterprisePlugin.UPxr_setMarkerInfoCallback(trackingMode,cameraYOffset,markerInfos);
- }
- /// <summary>
- /// Open RGB camera.
- /// @note The PICO Unity OpenXR SDK does not support this API.
- /// </summary>
- /// <returns>Whether the RGB camera has been opened:
- /// * `true`: success
- /// * `false`: failure
- /// </returns>
- public static bool OpenVSTCamera()
- {
- return PXR_EnterprisePlugin.UPxr_OpenVSTCamera();
- }
- /// <summary>
- /// Close RGB camera.
- /// @note The PICO Unity OpenXR SDK does not support this API.
- /// </summary>
- /// <returns>Whether the RGB camera has been closed:
- /// * `true`: success
- /// * `false`: failure
- /// </returns>
- public static bool CloseVSTCamera()
- {
- return PXR_EnterprisePlugin.UPxr_CloseVSTCamera();
- }
- /// <summary>
- /// Get camera parameters(including intrinsics & extrinsics).
- /// @note The PICO Unity OpenXR SDK does not support this API.
- /// </summary>
- /// <returns> RGBCameraParams including intrinsics and extrinsics.
- /// </returns>
- public static RGBCameraParams GetCameraParameters()
- {
- return PXR_EnterprisePlugin.UPxr_GetCameraParameters();
- }
- /// <summary>
- /// Get current head tracking confidence.
- /// @note The PICO Unity OpenXR SDK does not support this API.
- /// </summary>
- /// <returns>
- /// * `0`: bad
- /// * `1`: good
- /// </returns>
- public static int GetHeadTrackingConfidence()
- {
- return PXR_EnterprisePlugin.UPxr_GetHeadTrackingConfidence();
- }
- /// <summary>
- /// Acquire RGB camera frame,distortion
- /// @note The PICO Unity OpenXR SDK does not support this API.
- /// </summary>
- /// <param name="frame">[out]frame frame info</param>
- /// <returns>
- /// * `0`: success
- /// * other: failure
- /// </returns>
- public static int AcquireVSTCameraFrame(out Frame frame)
- {
- return PXR_EnterprisePlugin.UPxr_AcquireVSTCameraFrame(out frame);
- }
- /// <summary>
- /// Acquire RGB camera frame,anti-distortion
- /// @note The PICO Unity OpenXR SDK does not support this API.
- /// </summary>
- /// <param name="width">[in]width desired frame width,should be less equal than 2328</param>
- /// <param name="height">[in]height desired frame height, should be less equal than 1748</param>
- /// <param name="frame">[out]frame frame info</param>
- /// <returns>
- /// * `0`: success
- /// * other: failure
- /// </returns>
- public static int AcquireVSTCameraFrameAntiDistortion(int width, int height, out Frame frame)
- {
- return PXR_EnterprisePlugin.UPxr_AcquireVSTCameraFrameAntiDistortion(width, height, out frame);
- }
- /// <summary>
- /// Gets the predicted display time.
- /// @note The PICO Unity OpenXR SDK does not support this API.
- /// <returns>The predicted display time.</returns>
- public static double GetPredictedDisplayTime()
- {
- return PXR_EnterprisePlugin.UPxr_GetPredictedDisplayTime();
- }
- /// <summary>
- /// Gets the predicted status of the sensor.
- /// @note The PICO Unity OpenXR SDK does not support this API.
- /// </summary>
- /// <param name="predictTime">predict time.</param>
- /// <returns>The predicted status of the sensor.</returns>
- public static SensorState GetPredictedMainSensorState(double predictTime)
- {
- return PXR_EnterprisePlugin.UPxr_GetPredictedMainSensorState(predictTime);
- }
- /// <summary>
- /// Directs the user to the floor-height-adjustment app to adjust the floor's height.
- /// @note Supported by PICO Neo3 Pro, general PICO Neo3 devices activated as enterprise devices, and PICO 4 Enterprise.
- /// </summary>
- /// <returns>
- /// * `0`: success
- /// * `1`: failure
- /// </returns>
- public static int GotoSeeThroughFloorSetting()
- {
- return PXR_EnterprisePlugin.UPxr_gotoSeeThroughFloorSetting();
- }
- /// <summary>
- /// Copies a file or a folder from the source path to the destination path.
- /// @note Supported by PICO Neo3 Pro, general PICO Neo3 devices activated as enterprise devices, and PICO 4 Enterprise.
- /// </summary>
- /// <param name="srcPath">
- /// The source path of the file or folder.
- /// * For mobile storage devices, the prefix of the path is 'udisk://'. For example, the path of the Movie folder under the root directory should be passed as 'udisk://Movie'.
- /// * For internal storage paths, directly specify the path under the root directory. For example, the path of the Picture folder under the root directory should be passed as 'Picture'.
- /// </param>
- /// <param name="dstPath">
- /// The destination path that the file or folder is copied to.
- /// * For mobile storage devices, the prefix of the path is 'udisk://'. For example, the path of the Movie folder under the root directory should be passed as 'udisk://Movie'.
- /// * For internal storage paths, directly write the path under the root directory. For example, the path of the Picture folder under the root directory should be passed as 'Picture'.
- /// </param>
- /// <param name="callback">The result callback:
- /// * `onCopyStart`: copy start callback
- /// * `onCopyProgress(double process)`: copy progress callback, value range:[0.00, 1.00]
- /// * `onCopyFinish(int errorCode)`: `0` (copy succeeded); `101` (USB flash disk is not connected); `103` (insufficient storage space in the target device); `104` (copy failed)
- /// </param>
- /// <returns>
- /// * `0`: API call succeeded, wait for copy to start
- /// * `101`: USB flash drive is not connected
- /// * `102`: source file/folder does not exist
- /// * `106`: null parameter
- /// </returns>
- public static int FileCopy(String srcPath, String dstPath, FileCopyCallback callback)
- {
- return PXR_EnterprisePlugin.UPxr_fileCopy(srcPath, dstPath, callback);
- }
- /// <summary>
- /// Checks whether a map is being used.
- /// @note Supported by PICO Neo3 Pro, general PICO Neo3 devices activated as enterprise devices, and PICO 4 Enterprise.
- /// </summary>
- /// <param name="path">The path of the map's zip file.</param>
- /// <param name="callback">The result callback:
- /// * `0`: success
- /// * `1`: failure
- /// * `101`: file does not exist
- /// * `102`: failed to unzip the file
- /// * `103`: file corruption
- /// * `104`: position tracking is disabled
- /// * `106`: failed to get the current map's information
- /// * `107`: `path` parameter is null
- /// </param>
- public static void IsMapInEffect(String path, Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_IsMapInEffect(path, callback);
- }
- /// <summary>
- /// Imports a map.
- /// @note Supported by PICO Neo3 Pro, general PICO Neo3 devices activated as enterprise devices, and PICO 4 Enterprise.
- /// </summary>
- /// <param name="path">The path of the map's zip file.</param>
- /// <param name="callback">The result callback:
- /// * `0`: success
- /// * `1`: failure
- /// * `101`: file does not exist
- /// * `102`: failed to unzip the file
- /// * `103`: file corruption
- /// * `104`: position tracking is disabled
- /// * `107`: `path` parameter is null
- /// </param>
- public static void ImportMapByPath(String path, Action<int> callback)
- {
- PXR_EnterprisePlugin.UPxr_ImportMapByPath(path, callback);
- }
- }
- }
|