October3d55/M/PICOOpenXR/Source/PICOOpenXRLoader/PICOMobile_APL.xml

217 lines
8.3 KiB
XML
Raw Normal View History

2025-03-10 09:43:27 +08:00
<?xml version="1.0" encoding="utf-8"?>
<!--Pico mobile plugin additions-->
<root xmlns:android="http://schemas.android.com/apk/res/android">
<init>
<setBoolFromProperty result="bEyeTrackingEnabled" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bEyeTrackingEnabled" default="false"/>
<setBoolFromProperty result="bEnableEyeTrackingCalibration" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bEnableEyeTrackingCalibration" default="false"/>
<setBoolFromProperty result="bIsHandTrackingUsed" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bIsHandTrackingUsed" default="false"/>
<setBoolFromProperty result="bIsHandHighFrequencyTracking" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bIsHandHighFrequencyTracking" default="false"/>
<setBoolFromProperty result="bEnableBodyTracking" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bEnableBodyTracking" default="false"/>
<setBoolFromProperty result="bUsingOSSplash" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bUsingOSSplash" default="false"/>
<setBoolFromProperty result="bEnablePassthroughEXT" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bEnablePassthroughEXT" default="false"/>
<setBoolFromProperty result="bEnableMRSafeguard" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bEnableMRSafeguard" default="false"/>
<setBoolFromProperty result="bEnableVST" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bEnableVST" default="false"/>
<setBoolFromProperty result="bEnableAnchor" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bEnableAnchor" default="false"/>
<setBoolFromProperty result="bEnableCloudAnchor" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bEnableCloudAnchor" default="false"/>
<setBoolFromProperty result="bEnableSceneCapture" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bEnableSceneCapture" default="false"/>
<setBoolFromProperty result="bEnableMesh" ini="Engine" section="/Script/PICOOpenXRRuntimeSettings.PICOOpenXRRuntimeSettings" property="bEnableMesh" default="false"/>
</init>
<!-- optional updates applied to AndroidManifest.xml -->
<androidManifestUpdates>
<addElements tag="application">
<meta-data android:name="pvr.app.type" android:value="vr"/>
<meta-data android:name="pvr.sdk.version" android:value="UE_PICO_OpenXR_1.4.1"/>
<meta-data android:name="pxr.sdk.2dloading.flag" android:value="system" />
</addElements>
<!-- Add MR Flag -->
<if condition="bEnableAnchor">
<true>
<addPermission android:name="com.picovr.permission.SPATIAL_DATA" />
</true>
<false>
<if condition="bEnableSceneCapture">
<true>
<addPermission android:name="com.picovr.permission.SPATIAL_DATA" />
</true>
<false>
<if condition="bEnableMesh">
<true>
<addPermission android:name="com.picovr.permission.SPATIAL_DATA" />
</true>
</if>
</false>
</if>
</false>
</if>
<if condition="bEnableMRSafeguard">
<true>
<addElements tag="application">
<meta-data android:name="enable_mr_safeguard" android:value="1" />
</addElements>
</true>
<false>
<addElements tag="application">
<meta-data android:name="enable_mr_safeguard" android:value="0" />
</addElements>
</false>
</if>
<if condition="bEnableVST">
<true>
<addFeature android:name="com.oculus.feature.PASSTHROUGH" android:required="true"/>
<addElements tag="application">
<meta-data android:name="enable_vst" android:value="1" />
</addElements>
</true>
<false>
<addElements tag="application">
<meta-data android:name="enable_vst" android:value="0" />
</addElements>
</false>
</if>
<if condition="bEnableAnchor">
<true>
<addElements tag="application">
<meta-data android:name="enable_spatial_anchor" android:value="1" />
</addElements>
<if condition="bEnableCloudAnchor">
<true>
<addElements tag="application">
<meta-data android:name="enable_cloud_anchor" android:value="1" />
</addElements>
</true>
<false>
<addElements tag="application">
<meta-data android:name="enable_cloud_anchor" android:value="0" />
</addElements>
</false>
</if>
</true>
<false>
<addElements tag="application">
<meta-data android:name="enable_spatial_anchor" android:value="0" />
<meta-data android:name="enable_cloud_anchor" android:value="0" />
</addElements>
</false>
</if>
<if condition="bEnableSceneCapture">
<true>
<addElements tag="application">
<meta-data android:name="enable_scene_anchor" android:value="1" />
</addElements>
</true>
<false>
<addElements tag="application">
<meta-data android:name="enable_scene_anchor" android:value="0" />
</addElements>
</false>
</if>
<if condition="bEnableMesh">
<true>
<addElements tag="application">
<meta-data android:name="enable_mesh_anchor" android:value="1" />
</addElements>
</true>
<false>
<addElements tag="application">
<meta-data android:name="enable_mesh_anchor" android:value="0" />
</addElements>
</false>
</if>
<!-- Add MR Flag -->
<!-- Add Eye Tracking flags-->
<setBool result="bEyeTrackingFeature" value="false"/>
<setBoolOr result="bEyeTrackingFeature" arg1="$B(bEyeTrackingFeature)" arg2="$B(bEyeTrackingEnabled)"/>
<if condition="bEyeTrackingFeature">
<true>
<log text="Adding eye tracking feature and permission tags to manifest"/>
<addPermission android:name="com.picovr.permission.EYE_TRACKING"/>
<addElements tag="application">
<meta-data android:name="picovr.software.eye_tracking" android:value="false/true"/>
</addElements>
<if condition="bEnableEyeTrackingCalibration">
<true>
<addElements tag="application">
<meta-data android:name="eyetracking_calibration" android:value="true"/>
</addElements>
</true>
</if>
</true>
</if>
<!-- Add Hand Tracking flags-->
<setBool result="bHandTrackingFeature" value="false"/>
<setBoolOr result="bHandTrackingFeature" arg1="$B(bHandTrackingFeature)" arg2="$B(bIsHandTrackingUsed)"/>
<if condition="bHandTrackingFeature">
<true>
<addPermission android:name="com.picovr.permission.HAND_TRACKING"/>
<addElements tag="application">
<meta-data android:name="handtracking" android:value="1"/>
</addElements>
</true>
<false>
<addElements tag="application">
<meta-data android:name="handtracking" android:value="0"/>
</addElements>
</false>
</if>
<if condition="bIsHandHighFrequencyTracking">
<true>
<addElements tag="application">
<meta-data android:name="Hand_Tracking_HighFrequency" android:value="1"/>
</addElements>
</true>
<false>
<addElements tag="application">
<meta-data android:name="Hand_Tracking_HighFrequency" android:value="0"/>
</addElements>
</false>
</if>
<!-- Add body Tracking Flag -->
<if condition="bEnableBodyTracking">
<true>
<addElements tag="application">
<meta-data android:name="PICO.swift.feature" android:value="1"/>
</addElements>
</true>
</if>
<!-- Add OS Splash flags-->
<if condition="bUsingOSSplash">
<true>
<addElements tag="application">
<meta-data android:name="pvr.app.splash" android:value="1" />
</addElements>
</true>
</if>
</androidManifestUpdates>
<!-- optional additions to proguard -->
<proguardAdditions>
<insert>
-keep class com.epicgames.unreal.GameActivity{*;}
-keep class com.psmart.aosoperation.SysActivity{*;}
</insert>
</proguardAdditions>
<!-- optional files or directories to copy to Intermediate/Android/APK -->
<resourceCopies>
<isArch arch="arm64-v8a">
<log text="Copying libopenxr_loader_pico.so"/>
<copyFile src="$S(PluginDir)/PICOOpenXRLoader/Lib/arm64-v8a/libopenxr_loader_pico.so"
dst="$S(BuildDir)/libs/arm64-v8a/libopenxr_loader_pico.so"/>
<copyFile src="$S(BuildDir)/../../../pico_splash.png" dst="$S(BuildDir)/assets/pico_splash.png" />
</isArch>
</resourceCopies>
</root>