commit da9b2bcd4612093c281f008ed3b1803139ad5b98
parent b33346a25d2fbe44bb637fcd49de4c84ab917cdc
Author: William Casarin <jb55@jb55.com>
Date: Tue, 28 Jan 2025 15:23:02 -0800
android: 0.30.0 game activity
still no text input, at least it's not crashing
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
5 files changed, 88 insertions(+), 211 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
@@ -100,24 +100,6 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
[[package]]
name = "android-activity"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64529721f27c2314ced0890ce45e469574a73e5e6fdd6e9da1860eb29285f5e0"
-dependencies = [
- "android-properties",
- "bitflags 1.3.2",
- "cc",
- "jni-sys",
- "libc",
- "log",
- "ndk 0.7.0",
- "ndk-context",
- "ndk-sys 0.4.1+23.1.7779620",
- "num_enum 0.6.1",
-]
-
-[[package]]
-name = "android-activity"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046"
@@ -130,10 +112,10 @@ dependencies = [
"jni-sys",
"libc",
"log",
- "ndk 0.9.0",
+ "ndk",
"ndk-context",
"ndk-sys 0.6.0+11769913",
- "num_enum 0.7.3",
+ "num_enum",
"thiserror 1.0.69",
]
@@ -187,7 +169,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -229,7 +211,7 @@ dependencies = [
"futures-channel",
"futures-util",
"rand",
- "raw-window-handle 0.6.2",
+ "raw-window-handle",
"serde",
"serde_repr",
"url",
@@ -355,7 +337,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -390,7 +372,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -511,7 +493,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
- "syn 2.0.90",
+ "syn",
"which",
]
@@ -710,7 +692,7 @@ checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -1117,7 +1099,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -1196,7 +1178,7 @@ dependencies = [
"percent-encoding",
"pollster",
"profiling",
- "raw-window-handle 0.6.2",
+ "raw-window-handle",
"static_assertions",
"wasm-bindgen",
"wasm-bindgen-futures",
@@ -1270,7 +1252,7 @@ dependencies = [
"egui 0.30.0",
"log",
"profiling",
- "raw-window-handle 0.6.2",
+ "raw-window-handle",
"smithay-clipboard",
"web-time 1.1.0",
"webbrowser",
@@ -1435,7 +1417,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -1456,7 +1438,7 @@ checksum = "fc4caf64a58d7a6d65ab00639b046ff54399a39f5f2554728895ace4b297cd79"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -1467,7 +1449,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -1648,7 +1630,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -1735,7 +1717,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -1877,7 +1859,7 @@ dependencies = [
"objc2-app-kit",
"objc2-foundation",
"once_cell",
- "raw-window-handle 0.6.2",
+ "raw-window-handle",
"wayland-sys",
"windows-sys 0.52.0",
"x11-dl",
@@ -1891,7 +1873,7 @@ checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f"
dependencies = [
"cfg_aliases 0.2.1",
"glutin",
- "raw-window-handle 0.6.2",
+ "raw-window-handle",
"winit",
]
@@ -2184,7 +2166,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -2294,7 +2276,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -2667,20 +2649,6 @@ checksum = "308d96db8debc727c3fd9744aac51751243420e46edf401010908da7f8d5e57c"
[[package]]
name = "ndk"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0"
-dependencies = [
- "bitflags 1.3.2",
- "jni-sys",
- "ndk-sys 0.4.1+23.1.7779620",
- "num_enum 0.5.11",
- "raw-window-handle 0.5.2",
- "thiserror 1.0.69",
-]
-
-[[package]]
-name = "ndk"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"
@@ -2689,8 +2657,8 @@ dependencies = [
"jni-sys",
"log",
"ndk-sys 0.6.0+11769913",
- "num_enum 0.7.3",
- "raw-window-handle 0.6.2",
+ "num_enum",
+ "raw-window-handle",
"thiserror 1.0.69",
]
@@ -2702,15 +2670,6 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
[[package]]
name = "ndk-sys"
-version = "0.4.1+23.1.7779620"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3"
-dependencies = [
- "jni-sys",
-]
-
-[[package]]
-name = "ndk-sys"
version = "0.5.0+25.2.9519653"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691"
@@ -2857,11 +2816,10 @@ dependencies = [
name = "notedeck_chrome"
version = "0.3.1"
dependencies = [
- "android-activity 0.4.3",
"eframe",
"egui 0.30.0",
+ "egui-winit",
"egui_extras 0.30.0",
- "log",
"notedeck",
"notedeck_columns",
"puffin",
@@ -2875,7 +2833,6 @@ dependencies = [
"tracing-appender",
"tracing-logcat",
"tracing-subscriber",
- "winit",
]
[[package]]
@@ -2959,7 +2916,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -2993,53 +2950,11 @@ dependencies = [
[[package]]
name = "num_enum"
-version = "0.5.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9"
-dependencies = [
- "num_enum_derive 0.5.11",
-]
-
-[[package]]
-name = "num_enum"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1"
-dependencies = [
- "num_enum_derive 0.6.1",
-]
-
-[[package]]
-name = "num_enum"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179"
dependencies = [
- "num_enum_derive 0.7.3",
-]
-
-[[package]]
-name = "num_enum_derive"
-version = "0.5.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799"
-dependencies = [
- "proc-macro-crate 1.3.1",
- "proc-macro2",
- "quote",
- "syn 1.0.109",
-]
-
-[[package]]
-name = "num_enum_derive"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6"
-dependencies = [
- "proc-macro-crate 1.3.1",
- "proc-macro2",
- "quote",
- "syn 2.0.90",
+ "num_enum_derive",
]
[[package]]
@@ -3048,10 +2963,10 @@ version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
dependencies = [
- "proc-macro-crate 3.2.0",
+ "proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -3429,7 +3344,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -3549,17 +3464,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033"
dependencies = [
"proc-macro2",
- "syn 2.0.90",
-]
-
-[[package]]
-name = "proc-macro-crate"
-version = "1.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
-dependencies = [
- "once_cell",
- "toml_edit 0.19.15",
+ "syn",
]
[[package]]
@@ -3568,7 +3473,7 @@ version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b"
dependencies = [
- "toml_edit 0.22.22",
+ "toml_edit",
]
[[package]]
@@ -3596,7 +3501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30"
dependencies = [
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -3747,12 +3652,6 @@ dependencies = [
[[package]]
name = "raw-window-handle"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9"
-
-[[package]]
-name = "raw-window-handle"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"
@@ -3892,7 +3791,7 @@ dependencies = [
"objc2-app-kit",
"objc2-foundation",
"pollster",
- "raw-window-handle 0.6.2",
+ "raw-window-handle",
"urlencoding",
"wasm-bindgen",
"wasm-bindgen-futures",
@@ -4151,7 +4050,7 @@ checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -4175,7 +4074,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -4384,7 +4283,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -4405,17 +4304,6 @@ dependencies = [
[[package]]
name = "syn"
-version = "1.0.109"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "syn"
version = "2.0.90"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31"
@@ -4433,7 +4321,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -4503,7 +4391,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -4514,7 +4402,7 @@ checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -4646,7 +4534,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -4658,7 +4546,7 @@ dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
- "toml_edit 0.22.22",
+ "toml_edit",
]
[[package]]
@@ -4672,17 +4560,6 @@ dependencies = [
[[package]]
name = "toml_edit"
-version = "0.19.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"
-dependencies = [
- "indexmap",
- "toml_datetime",
- "winnow 0.5.40",
-]
-
-[[package]]
-name = "toml_edit"
version = "0.22.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
@@ -4691,7 +4568,7 @@ dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
- "winnow 0.6.20",
+ "winnow",
]
[[package]]
@@ -4700,6 +4577,7 @@ version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
dependencies = [
+ "log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
@@ -4725,7 +4603,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -5063,7 +4941,7 @@ dependencies = [
"log",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
"wasm-bindgen-shared",
]
@@ -5098,7 +4976,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -5295,7 +5173,7 @@ dependencies = [
"naga",
"parking_lot",
"profiling",
- "raw-window-handle 0.6.2",
+ "raw-window-handle",
"smallvec",
"static_assertions",
"wasm-bindgen",
@@ -5323,7 +5201,7 @@ dependencies = [
"once_cell",
"parking_lot",
"profiling",
- "raw-window-handle 0.6.2",
+ "raw-window-handle",
"rustc-hash",
"smallvec",
"thiserror 1.0.69",
@@ -5361,7 +5239,7 @@ dependencies = [
"once_cell",
"parking_lot",
"profiling",
- "raw-window-handle 0.6.2",
+ "raw-window-handle",
"renderdoc-sys",
"rustc-hash",
"smallvec",
@@ -5457,7 +5335,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -5468,7 +5346,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -5711,7 +5589,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0be9e76a1f1077e04a411f0b989cbd3c93339e1771cb41e71ac4aee95bfd2c67"
dependencies = [
"ahash",
- "android-activity 0.6.0",
+ "android-activity",
"atomic-waker",
"bitflags 2.6.0",
"block2",
@@ -5726,7 +5604,7 @@ dependencies = [
"js-sys",
"libc",
"memmap2",
- "ndk 0.9.0",
+ "ndk",
"objc2",
"objc2-app-kit",
"objc2-foundation",
@@ -5734,7 +5612,7 @@ dependencies = [
"orbclient",
"percent-encoding",
"pin-project",
- "raw-window-handle 0.6.2",
+ "raw-window-handle",
"redox_syscall 0.4.1",
"rustix",
"sctk-adwaita",
@@ -5758,15 +5636,6 @@ dependencies = [
[[package]]
name = "winnow"
-version = "0.5.40"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "winnow"
version = "0.6.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b"
@@ -5891,7 +5760,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
"synstructure",
]
@@ -5924,7 +5793,7 @@ dependencies = [
"tracing",
"uds_windows",
"windows-sys 0.59.0",
- "winnow 0.6.20",
+ "winnow",
"xdg-home",
"zbus_macros",
"zbus_names",
@@ -5937,10 +5806,10 @@ version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3685b5c81fce630efc3e143a4ded235b107f1b1cdf186c3f115529e5e5ae4265"
dependencies = [
- "proc-macro-crate 3.2.0",
+ "proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
"zbus_names",
"zvariant",
"zvariant_utils",
@@ -5954,7 +5823,7 @@ checksum = "519629a3f80976d89c575895b05677cbc45eaf9f70d62a364d819ba646409cc8"
dependencies = [
"serde",
"static_assertions",
- "winnow 0.6.20",
+ "winnow",
"zvariant",
]
@@ -5976,7 +5845,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -5996,7 +5865,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
"synstructure",
]
@@ -6025,7 +5894,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
]
[[package]]
@@ -6063,7 +5932,7 @@ dependencies = [
"serde",
"static_assertions",
"url",
- "winnow 0.6.20",
+ "winnow",
"zvariant_derive",
"zvariant_utils",
]
@@ -6074,10 +5943,10 @@ version = "5.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "573a8dd76961957108b10f7a45bac6ab1ea3e9b7fe01aff88325dc57bb8f5c8b"
dependencies = [
- "proc-macro-crate 3.2.0",
+ "proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.90",
+ "syn",
"zvariant_utils",
]
@@ -6091,6 +5960,6 @@ dependencies = [
"quote",
"serde",
"static_assertions",
- "syn 2.0.90",
- "winnow 0.6.20",
+ "syn",
+ "winnow",
]
diff --git a/Cargo.toml b/Cargo.toml
@@ -19,6 +19,7 @@ dirs = "5.0.1"
eframe = { version = "0.30.0", default-features = false, features = [ "wgpu", "wayland", "x11", "android-game-activity" ] }
egui = { version = "0.30.0", features = ["serde"] }
egui_extras = { version = "0.30.0", features = ["all_loaders"] }
+egui-winit = { version = "0.30.0", features = ["android-game-activity"] }
egui_nav = { git = "https://github.com/damus-io/egui-nav", rev = "eb297a0fefd9047352102346625a2eba93a1aa04" }
egui_tabs = { git = "https://github.com/damus-io/egui-tabs", rev = "5d0bacc6ce2c645fe8a77723d2beb0f85b8148ee" }
egui_virtual_list = "0.6.0"
@@ -48,7 +49,7 @@ strum = "0.26"
strum_macros = "0.26"
thiserror = "2.0.7"
tokio = { version = "1.16", features = ["macros", "rt-multi-thread", "fs"] }
-tracing = "0.1.40"
+tracing = { version = "0.1.40", features = ["log"] }
tracing-appender = "0.2.3"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tempfile = "3.13.0"
diff --git a/crates/notedeck_chrome/Cargo.toml b/crates/notedeck_chrome/Cargo.toml
@@ -46,9 +46,9 @@ debug-interactive-widgets = []
[target.'cfg(target_os = "android")'.dependencies]
tracing-logcat = "0.1.0"
-log = { workspace = true }
-android-activity = { version = "0.4", features = [ "game-activity" ] }
-winit = { version = "0.30.5", features = [ "android-game-activity" ] }
+#log = { workspace = true }
+#android-activity = { version = "0.6", features = [ "game-activity" ] }
+egui-winit.workspace = true
[package.metadata.bundle]
name = "Notedeck"
diff --git a/crates/notedeck_chrome/android/app/src/main/java/com/damus/notedeck/MainActivity.java b/crates/notedeck_chrome/android/app/src/main/java/com/damus/notedeck/MainActivity.java
@@ -23,6 +23,7 @@ public class MainActivity extends GameActivity {
protected void onCreate(Bundle savedInstanceState) {
// Shrink view so it does not get covered by insets.
+ /*
View content = getWindow().getDecorView().findViewById(android.R.id.content);
ViewCompat.setOnApplyWindowInsetsListener(content, (v, windowInsets) -> {
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
@@ -38,6 +39,7 @@ public class MainActivity extends GameActivity {
});
WindowCompat.setDecorFitsSystemWindows(getWindow(), true);
+ */
super.onCreate(savedInstanceState);
}
@@ -46,9 +48,11 @@ public class MainActivity extends GameActivity {
public boolean onTouchEvent(MotionEvent event) {
// Offset the location so it fits the view with margins caused by insets.
+ /*
int[] location = new int[2];
findViewById(android.R.id.content).getLocationOnScreen(location);
event.offsetLocation(-location[0], -location[1]);
+ */
return super.onTouchEvent(event);
}
}
diff --git a/crates/notedeck_chrome/src/android.rs b/crates/notedeck_chrome/src/android.rs
@@ -1,9 +1,8 @@
//#[cfg(target_os = "android")]
//use egui_android::run_android;
+use egui_winit::winit::platform::android::activity::AndroidApp;
use notedeck_columns::Damus;
-use winit::platform::android::activity::AndroidApp;
-use winit::platform::android::EventLoopBuilderExtAndroid;
use crate::setup::setup_chrome;
use notedeck::Notedeck;
@@ -18,10 +17,12 @@ pub async fn android_main(app: AndroidApp) {
use tracing_subscriber::{prelude::*, EnvFilter};
std::env::set_var("RUST_BACKTRACE", "full");
- std::env::set_var(
- "RUST_LOG",
- "enostr=debug,notedeck_columns=debug,notedeck_chrome=debug",
- );
+ std::env::set_var("RUST_LOG", "egui=trace");
+
+ //std::env::set_var(
+ // "RUST_LOG",
+ // "enostr=debug,notedeck_columns=debug,notedeck_chrome=debug",
+ //);
let writer =
LogcatMakeWriter::new(LogcatTag::Target).expect("Failed to initialize logcat writer");
@@ -44,10 +45,12 @@ pub async fn android_main(app: AndroidApp) {
let mut options = eframe::NativeOptions::default();
options.renderer = eframe::Renderer::Wgpu;
// Clone `app` to use it both in the closure and later in the function
- let app_clone_for_event_loop = app.clone();
- options.event_loop_builder = Some(Box::new(move |builder| {
- builder.with_android_app(app_clone_for_event_loop);
- }));
+ //let app_clone_for_event_loop = app.clone();
+ //options.event_loop_builder = Some(Box::new(move |builder| {
+ // builder.with_android_app(app_clone_for_event_loop);
+ //}));
+
+ options.android_app = Some(app.clone());
let app_args = get_app_args(app);