android example lib, almost done

This commit is contained in:
Alexi Chepura
2023-10-18 13:13:20 +03:00
parent 3bacc37e74
commit 28c847244a
6 changed files with 23 additions and 21 deletions

3
examples/android/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
/target
/Cargo.lock
/runtime_libs

View File

@@ -13,10 +13,10 @@ crate-type = ["staticlib", "cdylib"]
[package.metadata.android]
package = "org.bevyengine.example_openxr_android"
build_targets = ["aarch64-linux-android"]
runtime_libs = "examples/libs"
runtime_libs = "runtime_libs"
apk_name = "bevyopenxr"
assets = "assets"
res = "assets/android-res"
# assets = "assets"
# res = "assets/android-res"
icon = "@mipmap/ic_launcher"
label = "Bevy Openxr Android"
strip = "strip"
@@ -29,18 +29,9 @@ target_sdk_version = 32
# label = "Bevy Example"
[dependencies]
anyhow = "1.0.75"
# ash = "0.37.3"
bevy_openxr = { path = "../.." }
bevy = { git = "https://github.com/bevyengine/bevy.git" }
openxr = { git = "https://github.com/Ralith/openxrs", features = ["mint"] }
mint = "0.5.9"
wgpu = "0.17.1"
wgpu-core = { version = "0.17.1", features = ["vulkan"] }
wgpu-hal = "0.17.2"
[dev-dependencies]
color-eyre = "0.6.2"
[profile.release]
lto = "fat"
@@ -61,6 +52,16 @@ categories = [
"android.intent.category.LAUNCHER",
]
# !! IMPORTANT !!
#
# When creating your own apps, make sure to generate your own keystore, rather than using our example one!
# You can use `keytool` like so:
# keytool -genkey -v -keystore my-release-key.keystore -keyalg RSA -keysize 2048 -validity 10000
#
# For more information on key signing and why it's so important, check out this article:
# https://developer.android.com/studio/publish/app-signing
#
# !! IMPORTANT !!
[package.metadata.android.signing.release]
path = "./hotham_examples.keystore"
keystore_password = "chomsky-vigilant-spa"

View File

@@ -0,0 +1,6 @@
# Bevy OpenXR Android example
Running on Meta Quest can be done with https://github.com/rust-mobile/cargo-apk and requires disabling default features.
```sh
cargo apk run --release
```

Binary file not shown.

View File

@@ -10,8 +10,6 @@ use bevy_openxr::DefaultXrPlugins;
#[bevy_main]
fn main() {
color_eyre::install().unwrap();
App::new()
.add_plugins(DefaultXrPlugins)
.add_plugins(OpenXrDebugRenderer)