Skip to content

Commit

Permalink
adds AndroidXR manifest entries
Browse files Browse the repository at this point in the history
  • Loading branch information
korejan committed Dec 15, 2024
1 parent 889404e commit 1e2def6
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 32 deletions.
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

103 changes: 94 additions & 9 deletions alvr/openxr-client/alxr-client-android/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-client-android"
version = "0.58.0"
version = "0.59.0"
authors = ["korejan <[email protected]>"]
edition = "2021"
description = "An OpenXR based ALVR client for android platorms"
Expand All @@ -11,7 +11,9 @@ description = "An OpenXR based ALVR client for android platorms"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
no-decoder = ["alxr-common/no-decoder"] # disables building platform decoders & depeendencies.
no-decoder = [
"alxr-common/no-decoder",
] # disables building platform decoders & depeendencies.

[lib]
crate-type = ["cdylib"]
Expand All @@ -21,15 +23,20 @@ alxr-common = { path = "../alxr-common" }
jni = "0.21"
log = "0.4"
android_logger = "0.14"
android-activity = { version="0.6", features = [ "native-activity" ] }
android-activity = { version = "0.6", features = ["native-activity"] }
ndk-context = "0.1"
libloading = "0.8"
lazy_static = "1"
parking_lot = "0.12"
version-compare = "0.2"

[package.metadata.android]
build_targets = ["aarch64-linux-android", "armv7-linux-androideabi", "x86_64-linux-android", "i686-linux-android"]
build_targets = [
"aarch64-linux-android",
"armv7-linux-androideabi",
"x86_64-linux-android",
"i686-linux-android",
]

# Path to your application's resources folder.
# If not specified, resources will not be included in the APK.
Expand Down Expand Up @@ -91,7 +98,7 @@ keystore_password = "android"
[package.metadata.android.sdk]
target_sdk_version = 32
compile_sdk = 35
min_sdk_version = 29#24 # for offical low-latency medicodec mode to be enabled, min sdk must be >= 30.
min_sdk_version = 29 #24 # for offical low-latency medicodec mode to be enabled, min sdk must be >= 30.

#[dependencies.android_glue]
#path = "../../glue"
Expand All @@ -115,11 +122,11 @@ min_sdk_version = 29#24 # for offical low-latency medicodec mode to be enabled,
# Adds extra arbitrary XML attributes to the <activity> tag in the manifest.
# See https://developer.android.com/guide/topics/manifest/activity-element.html
[package.metadata.android.activity_attributes]
"android:theme" ="@android:style/Theme.Black.NoTitleBar.Fullscreen"
"android:theme" = "@android:style/Theme.Black.NoTitleBar.Fullscreen"
"android:launchMode" = "singleTask"
"android:screenOrientation" = "landscape"
"android:excludeFromRecents" = "true"
"android:resizeableActivity"= "false"
"android:resizeableActivity" = "false"
"android:configChanges" = "screenSize|screenLayout|orientation|keyboardHidden|keyboard|navigation|uiMode|density"
#"android:enableVrMode" = "com.google.vr.vrcore/com.google.vr.vrcore.common.VrCoreListenerService"
#"android:uiOptions" = "none"
Expand Down Expand Up @@ -150,6 +157,22 @@ name = "android.hardware.vulkan.version"
version = 0x00401000
required = true

[[package.metadata.android.uses_feature]]
name = "android.software.xr.immersive"
required = true

[[package.metadata.android.uses_feature]]
name = "android.hardware.xr.input.controller"
required = false

[[package.metadata.android.uses_feature]]
name = "android.hardware.xr.input.hand_tracking"
required = false

[[package.metadata.android.uses_feature]]
name = "android.hardware.xr.input.eye_tracking"
required = false

[[package.metadata.android.uses_feature]]
name = "oculus.software.handtracking"
required = false
Expand Down Expand Up @@ -211,6 +234,21 @@ name = "android.permission.ACCESS_WIFI_STATE"
[[package.metadata.android.uses_permission]]
name = "android.permission.WAKE_LOCK"

[[package.metadata.android.uses_permission]]
name = "android.permission.HAND_TRACKING"

[[package.metadata.android.uses_permission]]
name = "android.permission.EYE_TRACKING"

[[package.metadata.android.uses_permission]]
name = "android.permission.EYE_TRACKING_FINE"

[[package.metadata.android.uses_permission]]
name = "android.permission.FACE_TRACKING"

# [[package.metadata.android.uses_permission]]
# name = "android.permission.SCENE_UNDERSTANDING"

[[package.metadata.android.uses_permission]]
name = "com.oculus.permission.WIFI_LOCK"

Expand Down Expand Up @@ -244,8 +282,15 @@ name = "com.magicleap.permission.HAND_TRACKING"
[[package.metadata.android.uses_permission]]
name = "com.magicleap.permission.EYE_TRACKING"

[[package.metadata.android.uses_permission]]
name = "com.picovr.permission.HAND_TRACKING"

[[package.metadata.android.uses_permission]]
name = "com.picovr.permission.EYE_TRACKING"

[[package.metadata.android.uses_permission]]
name = "org.khronos.openxr.permission.OPENXR"

[[package.metadata.android.uses_permission]]
name = "org.khronos.openxr.permission.OPENXR_SYSTEM"

Expand All @@ -258,8 +303,8 @@ name = "org.freedesktop.monado.openxr_runtime.out_of_process"

[[package.metadata.android.queries.provider]]
authorities = "org.khronos.openxr.runtime_broker;org.khronos.openxr.system_runtime_broker"
# `name` attribute is not to be part of query-provider but cargo-apk uses aapt which throws errors without
# possibly needs to change to use appt2
# `name` attribute is not to be part of query-provider but cargo-apk uses aapt which throws errors without
# possibly needs to change to use appt2
name = "org.khronos.openxr"

[[package.metadata.android.queries.intent]]
Expand Down Expand Up @@ -351,6 +396,38 @@ value = "V2.0"
name = "com.oculus.handtracking.frequency"
value = "HIGH"

[[package.metadata.android.application.meta_data]]
name = "pvr.app.type"
value = "vr"

[[package.metadata.android.application.meta_data]]
name = "pvr.sdk.version"
value = "OpenXR"

[[package.metadata.android.application.meta_data]]
name = "rendering_mode"
value = "1" # 0 Multipass, 1 Multview

[[package.metadata.android.application.meta_data]]
name = "display_rate"
value = "90" # only the default, can be changed.

[[package.metadata.android.application.meta_data]]
name = "handtracking"
value = "1"

[[package.metadata.android.application.meta_data]]
name = "MRCsupport"
value = "1"

[[package.metadata.android.application.meta_data]]
name = "picovr.software.eye_tracking"
value = "1"

[[package.metadata.android.application.meta_data]]
name = "eyetracking_calibration"
value = "true"

#[[package.metadata.android.application.activity.intent_filters]] -- old version of cargo-apk/manifest.rs
[[package.metadata.android.application.activity.intent_filter]]
actions = ["android.intent.action.MAIN"]
Expand All @@ -361,6 +438,14 @@ categories = [
"com.yvr.intent.category.VR",
]

# <property
# android:name="android.window.PROPERTY_XR_ACTIVITY_START_MODE"
# android:value="XR_ACTIVITY_START_MODE_FULL_SPACE_UNMANAGED" />
# <activity
[[package.metadata.android.application.property]]
name = "android.window.PROPERTY_XR_ACTIVITY_START_MODE"
value = "XR_ACTIVITY_START_MODE_FULL_SPACE_UNMANAGED"

# See https://developer.android.com/guide/topics/manifest/data-element
#
# Note: there can be several .data entries.
Expand Down
15 changes: 11 additions & 4 deletions alvr/openxr-client/alxr-client-android/pico/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-client-pico"
version = "0.58.0"
version = "0.59.0"
authors = ["korejan <[email protected]>"]
edition = "2021"
description = "An OpenXR based ALVR client for Pico 4/Neo 3, PUI >= v5.2.x"
Expand Down Expand Up @@ -185,6 +185,9 @@ name = "android.permission.ACCESS_WIFI_STATE"
[[package.metadata.android.uses_permission]]
name = "android.permission.WAKE_LOCK"

[[package.metadata.android.uses_permission]]
name = "com.picovr.permission.HAND_TRACKING"

[[package.metadata.android.uses_permission]]
name = "com.picovr.permission.EYE_TRACKING"

Expand Down Expand Up @@ -271,9 +274,9 @@ resizeableActivity = "false"
name = "pvr.app.type"
value = "vr"

#[[package.metadata.android.application.meta_data]]
#name = "pvr.sdk.version"
#value = "XR Platform_2.1.2.4"
[[package.metadata.android.application.meta_data]]
name = "pvr.sdk.version"
value = "OpenXR"

[[package.metadata.android.application.meta_data]]
name = "rendering_mode"
Expand All @@ -299,6 +302,10 @@ value = "1" # 1 == Linear space.
name = "picovr.software.eye_tracking"
value = "1"

[[package.metadata.android.application.meta_data]]
name = "eyetracking_calibration"
value = "true"

# TODO: Re-enable when Pico runtime supports it.
#[[package.metadata.android.application.meta_data]]
#name = "picovr.software.face_tracking"
Expand Down
6 changes: 6 additions & 0 deletions alvr/openxr-client/alxr-client-android/src/permissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,15 @@ pub fn check_android_permissions<'a>(
for perm_name in [
"RECORD_AUDIO",
"READ_EXTERNAL_STORAGE",
"android.permission.EYE_TRACKING",
"android.permission.EYE_TRACKING_FINE",
"android.permission.FACE_TRACKING",
"android.permission.HAND_TRACKING",
// "android.permission.SCENE_UNDERSTANDING",
"com.oculus.permission.EYE_TRACKING",
"com.oculus.permission.FACE_TRACKING",
"com.magicleap.permission.EYE_TRACKING",
"com.picovr.permission.HAND_TRACKING",
"com.picovr.permission.EYE_TRACKING",
// Re-enable when Pico runtime supports it.
//"com.picovr.permission.FACE_TRACKING",
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-client"
version = "0.58.0"
version = "0.59.0"
authors = ["korejan <[email protected]>"]
edition = "2021"
description = "An OpenXR based ALVR client for non-android platorms"
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-client/uwp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-client-uwp"
version = "1.58.0"
version = "1.59.0"
authors = ["korejan <[email protected]>"]
edition = "2021"
build = ".build/main.rs"
Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-common"
version = "0.58.0"
version = "0.59.0"
authors = ["korejan <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion alvr/openxr-client/alxr-engine-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "alxr-engine-sys"
version = "0.58.0"
version = "0.59.0"
authors = ["korejan <[email protected]>"]
edition = "2021"
links = "alxr_engine"
Expand Down

0 comments on commit 1e2def6

Please sign in to comment.